[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Crash when clearing "ans" variable in symbol table
From: |
John W. Eaton |
Subject: |
Crash when clearing "ans" variable in symbol table |
Date: |
Mon, 14 Jan 2008 15:15:27 -0500 |
On 14-Jan-2008, Michael Goffioul wrote:
| While trying to run the "ad" package from octave-forge in my octave
| (CVS, Windows+MSVC), I found that octave crashes when clearing
| variables from the symbol table at the end of a user function evaluation
| (ov-usr-fcn.cc:line 404). I could not reproduce the crash using a
| simpler use-case, so I'll try to explain the context in which this happens.
|
| I'm calling "__ga__ (stdout)" to run the test suite contained in __ga__.m
| file (see
http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/extra/ad/inst/__ga__.m?revision=4487&view=markup).
| This ends up calling test ("__ga__", "quiet", stdout), which runs the
| test suite. As far as I could debug, the test function runs fine and exit
| without any problem, then the interpreter gets back to the initial
| __ga__ call. This function ends and the variable clearing takes place
| (ov-usr-fcn.cc:line 404). One of the variable is "ans", but the problem is
| that the "value_stack" of the corresponding symbol_record is empty.
| The assignment at line 111 in symtab.h "varref () = octave_value ();"
| calls varref(), which calls value_stack.top(), which crashes because
| value_stack is empty.
|
| I have no idea how to tackle this problem (I actually don't know what
| *is* the problem: whether it's the fact that value_stack is empty, or
| something else).
Objects are pushed on the value_stack when functions are called
recursively. My guess is that you've found some way to have a
recursive call that doesn't properly trigger the push, but still has a
pop of the stack.
jwe