|
From: | Daniel J Sebald |
Subject: | Re: Assertion in symbol table due to Revision 8881 |
Date: | Tue, 30 Jun 2009 22:05:27 -0500 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 |
Jaroslav Hajek wrote:
On Mon, Jun 29, 2009 at 8:10 AM, Daniel J Sebald<address@hidden> wrote:
[snip]
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. DanHmm, 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/
OK, but I'm wondering what the intent of the 'xcurrent_context == 0' test was. Ensuring that a passed-in variable is a particular value doesn't make sense; why pass in such a variable? Just use its value. Perhaps the test was intended to be 'xcurrent_context >= 0'? I just want to make sure that we aren't leaving out a check on some kind of stack operation that might be difficult to find at a later date. Dan
[Prev in Thread] | Current Thread | [Next in Thread] |