bugGNU Octave - Bugs: bug #40744, assert not robust against errors...

 
 

bug #40744: assert not robust against errors and interrupts (CTRL-C)

Submitter:  Michael Goffioul <goffioul>
Submitted:  Fri 29 Nov 2013 02:35:52 AM UTC
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)
   

Comment Type & Canned Response:
       

 

Thu 28 Dec 2017 06:30:00 PM UTC, comment #2: 

I just tried creating a large variable x, using "isequal (x,x)", and then interrupting the operation with Ctrl+C.  isequal continues to work after this so I believe this has been fixed.

Closing report.

Rik <rik5>
Project Administrator
Fri 25 Nov 2016 10:18:49 PM UTC, comment #1: 

This is probably FIXED in Octave 4.2.0.

When I look at the code of assert.m, then I see the following happening with the variable call_depth:

  persistent call_depth = -1;

  unwind_protect

    call_depth += 1;

  unwind_protect_cleanup
    call_depth -= 1;
  end_unwind_protect

So I think that it is not possible any more to hinder the execution of the final decrement statement.

Hartmut <hardy>
Fri 29 Nov 2013 02:35:52 AM UTC, original submission:  

The current implementation of assert.m (as of afeb233ea443) is not robust against errors and interrupts (due to CTRL-C). The persistent variable call_depth can be left at a value >= 0 if the final decrement statement is not executed, leading to non-functional assert afterwards.

Possible triggers are:
1) error during execution of assert, as in bug #40743
2) CTRL-C

This should be avoided by using unwind_protect and saving/restoring the call_depth current value.

Michael Goffioul <goffioul>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.

     

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-12-28 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top


    Powered by Savane 3.9