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

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

[Octave-bug-tracker] [bug #35068] octave segfaults when running test fun


From: anonymous
Subject: [Octave-bug-tracker] [bug #35068] octave segfaults when running test functions
Date: Wed, 14 Dec 2011 09:14:05 +0000
User-agent: Opera/9.80 (X11; Linux i686; U; en) Presto/2.7.62 Version/11.00

URL:
  <http://savannah.gnu.org/bugs/?35068>

                 Summary: octave segfaults when running test functions
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 14 Dec 2011 09:14:04 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: Josef Leydold
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.3
        Operating System: GNU/Linux

    _______________________________________________________

Details:

Suppose one has the following test file 'testbug' that just contains the
following two lines:


%!test
%!   function retval= myfunct(x) retval = exp(-x.*x); endfunction


and runs this test three times, e.g., by means of the following script
'testbug.m' using 'octave testbug.m'
from the command line:


test testbug verbose
test testbug verbose
test testbug verbose


Then octave crashes with a segfault:


$ octave testbug.m
GNU Octave, version 3.4.3
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

>>>>> /home/leydold/svn/anuran/octave/bug/testbug
  ***** test
   function retval= myfunct(x) retval = exp(-x.*x); endfunction
PASSES 1 out of 1 tests
>>>>> /home/leydold/svn/anuran/octave/bug/testbug
  ***** test
   function retval= myfunct(x) retval = exp(-x.*x); endfunction
PASSES 1 out of 1 tests
>>>>> /home/leydold/svn/anuran/octave/bug/testbug
  ***** test
   function retval= myfunct(x) retval = exp(-x.*x); endfunction
panic: Segmentation fault -- stopping myself...
Segmentation fault


When running octave with valgrind I get the following error report:

==2861== 1 errors in context 1 of 3606:
==2861== Jump to the invalid address stated on the next line
==2861==    at 0x0: ???
==2861==    by 0x52ED6DC: finish_function(tree_parameter_list*,
octave_user_function*, octave_comment_list*) (in
/usr/lib64/octave/3.4.3/liboctinterp.so.0.0.0)
==2861==    by 0x52F4CD2: octave_parse() (in
/usr/lib64/octave/3.4.3/liboctinterp.so.0.0.0)

[ stuff deleted ]

==2861==  Address 0x0 is not stack'd, malloc'd or (recently) free'd


I guess that octave accidently has freed a function pointer and set it to NULL
and then tried to call the function.

I am new to octave so I know too little about the internal structures of
octave so I cannot trace down the error.
The call stack before the crash lists functions like
'tree_evaluator::visit_statement' so it happens somewhere in the parse tree of
the interpreter.

Josef






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35068>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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