[Top][All Lists]

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

Re: assert.m and CTRL-C

From: Daniel J Sebald
Subject: Re: assert.m and CTRL-C
Date: Thu, 28 Nov 2013 20:24:49 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 11/28/2013 05:58 PM, Michael Goffioul wrote:

While testing CTRL-C behavior while running the test suite, I noticed
strange behavior of assert after interruption. I believe that one of
them is due to the unprotected usage of call_depth persistent variable
within assert.m.

If you happen to interrupt octave while executing assert.m, it's
possible that call_depth is never properly decremented, as expected at
the end of assert.m. This means that on the next assert call, call_depth
will never reach -1 and the error will not be triggered. I noticed this
kind of behavior after interrupting the test suite, something like
"assert (0,1)" would not trigger any error. Using "clear all" would
restore assert behavior, which makes me think it's related to the
persistent variables.

This then brings me to a side question: if assert.m was using
unwind_protect, would it be robust against CTRL-C interruption? I
believe it would be, but I'm not 100% sure.


I think you are correct Michael. Could you please copy this post into a bug report?

This doesn't seem 3.8 critical. Breaking out of tests at the wrong time seems very likely. However, there probably aren't a lot of users who will be running the test suite. But this should be a fairly high priority item for the development branch once that organization is determined.



reply via email to

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