octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #64817] VM seems to get out of sync in certain


From: anonymous
Subject: [Octave-bug-tracker] [bug #64817] VM seems to get out of sync in certain situations and throws error / produces core dump
Date: Wed, 25 Oct 2023 23:43:37 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64817>

                 Summary: VM seems to get out of sync in certain situations
and throws error / produces core dump
                   Group: GNU Octave
               Submitter: None
               Submitted: Thu 26 Oct 2023 03:43:35 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Segfault, Bus Error, etc.
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Thu 26 Oct 2023 03:43:35 AM UTC By: Anonymous
The VM either 
- throws an error „VM internal error: Invalid internal offset. Smaller than
original size and not in table“ when calling a script OR 
- produces a core dump when the same script commands are just executed on the
command line OR
- produces a core dump when the logic the enable/disable the VM is removed
from a script and the VM just enabled on the command line. 

Overall adding or removing a variable or exchanging a variable to a struct
variable or slightly changing the logic seems to have an impact on the error,
so I guess that the VM gets out of sync. Also important seems to have an
unknown function / unknown function parameter as struct in the code (but this
code will never be executed), but the error/core dump yes/no logic related to
any code changes escapes me...


The HG-id is ffc410f26506, so all VM patches before today are in.


When calling test1.m, the VM throws an error:
"VM internal error: Invalid internal offset. Smaller than original size and
not in table
VM error 7566: Exception in Snippet_test3 escaped the VM
error: VM error 7567: Exception in Snippet_test3 escaped the VM
error: called from
    Snippet_test3
    test2 at line 3 column 3
    test1 at line 4 column 6"

When the same commands are executed on the command line, a core dump is
produced.

When the VM enable/disable logic lines are removed from Snippet_test3.m, the
VM enabled on the command line and test1.m is executed, a core dump is
produced.


Without the VM active (e.g. setting VM_Compile = false or simply removing the
lines in the script), there is no problem.


test1.m

source Snippet_test3.m
do
 New = test2(0);
until New;


test2.m

function retval = test2 (t1)

  source Snippet_test3.m;
  Fs = readdir(files.model_path);
  do
    if false
      P = I_Do_No_Exist(Var_Does_Not_Exist_As_Well.Take);
    endif
  until true

  retval = !t1;
endfunction




Snippet_test3.m

files = struct();
files.model_path = pwd ();
Fs = readdir(files.model_path);
Take = false(size(Fs));

# if all the lines below are removed and the VM is just enabled on the command
line,
# then a core dump is produced without the VM throwing an error.
VM_Compile = true;
if VM_Compile
  __vm_enable__ (1);
else
  __vm_enable__ (0);
endif









    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64817>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]