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


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

Submitted by:  Michael Goffioul <goffioul>
Submitted on:  Fri 29 Nov 2013 02:35:52 AM UTC  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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:

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

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

Michael Goffioul <goffioul>
Project Member


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by goffioul (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 28 Dec 2017 06:30:00 PM UTCrik5StatusNone=>Fixed

    Back to the top

    Powered by Savane 3.1-cleanup1