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 Nov 29 02:35:52 2013  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

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


Fri Nov 25 22:18:49 2016, 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 Nov 29 02:35:52 2013, 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 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):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup1