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

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

[Octave-bug-tracker] [bug #41756] assert wrongly returning no error


From: Rik
Subject: [Octave-bug-tracker] [bug #41756] assert wrongly returning no error
Date: Wed, 05 Mar 2014 04:22:22 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0

Update of bug #41756 (project octave):

              Item Group:        Incorrect Result => Regression             
                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #2:

This is a regression from 3.6.4.  The problem appears to be in the m-file
assert.m.  There is a persistent variable call_depth which is used to keep
track of recursion in the function.  When Ctrl+C interrupts assert the
variable is left in an incorrect state.  Using 'clear -f assert' will
re-initialize the call_depth variable and bring back the correct behavior.

Long term, either the code needs to change not to use this style or Ctrl+C
needs to be trapped by assert so that it can re-initialize the call_depth
variable.

The following code is somewhat simpler and reproduces the problem.


a = 1:10e5;
b = a;
assert (a, b)
^C
assert (0, 1)
# No error
clear -f assert
assert (0, 1)
error: ASSERT errors for:  assert (0,1)

  Location  |  Observed  |  Expected  |  Reason
     ()           0            1         Abs err 1 exceeds tol 0



    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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