[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Assertion in symbol table due to Revision 8881
From: |
Jaroslav Hajek |
Subject: |
Re: Assertion in symbol table due to Revision 8881 |
Date: |
Tue, 30 Jun 2009 09:02:58 +0200 |
On Mon, Jun 29, 2009 at 8:10 AM, Daniel J Sebald<address@hidden> wrote:
> John,
>
> I've come across an assertion that I traced back to the first (second?) mod
> following version 3.1.53:
>
> --- a/src/ChangeLog Thu Feb 26 12:25:22 2009 -0500
> 2 +++ b/src/ChangeLog Thu Feb 26 13:58:47 2009 -0500
> 3 @@ -1,5 +1,25 @@
> 4 2009-02-26 John W. Eaton <address@hidden>
> 5 6 + * symtab.h
> (symbol_table::symbol_record::symbol_record_rep::forced):
> 7 + New static constant.
> 8 +
> (symbol_table::symbol_record::symbol_record_rep::force_variable,
> ...
>
> labelled as [Thu, 26 Feb 2009 13:58:47 -0500] rev 8881. (Wish Hg-viewer
> simply listed the date rather than a vague "4 months ago"... BTW, without
> the ChangeLog file I likely would have given up trying to locate where the
> bug appeared.)
>
> I'm afraid I can't be much help with a short example that causes the
> assertion. The code segment is embedded in a bigger convoluted program and
> the script file is a recursive one. Small examples I've tried don't cause
> the problem on its own. The best way for me to describe the occurence is
> "An assignment made inside of an eval(), inside of a nested/recursive script
> routine."
>
> The octave-core dump ends up being only 11 bytes long.
>
> The actual note is
>
> octave: symtab.h:1066 : static void symbol_table::force_variable(cost
> std::string&, int, size_t): Assertion
> `xcurrent_context == 0' failed.
> panic: Aborted -- stopping myself...
> attempting to save variables to 'octave-core'...
> save to 'octave-core' complete
> Aborted
>
> Version 3.1.53 works fine.
>
> Dan
>
>
Hmm, I don't see why the assertion is valid. Surely force_variable
*can* be executed in nonzero context (i.e. recursive call), using
eval, as your example shows.
Another example is
function testf2(n)
if (n > 0)
testf2 (n-1);
else
eval(["a = ", num2str(n)]);
endif
octave:1> testf2(3)
Since it doesn't seem to break anything, I've removed the assertion:
http://hg.savannah.gnu.org/hgweb/octave/
thanks
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz