bugGNU Octave - Bugs: bug #36146, Failed assertion in interpreter...


bug #36146: Failed assertion in interpreter with anonymous functions

Submitted by:  Rik <rik5>
Submitted on:  Tue 10 Apr 2012 11:00:07 PM UTC  
Category:  Interpreter Severity:  4 - Important
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

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


( Jump to the original submission)

Sun 23 Jun 2013 11:28:43 PM UTC, comment #9:

This seems to have been fixed sometime in the last few months. Closing report.

Rik <rik5>
Project Administrator
Fri 15 Mar 2013 04:00:51 PM UTC, comment #8:

Confirmed. The new parser behavior has been corrected and a newline will terminate an anonymous function call. But, the problem with an anonymous function over multiple lines is still there.

Rik <rik5>
Project Administrator
Fri 15 Mar 2013 05:47:24 AM UTC, comment #7:

But, the original assertion failure is still there.

Michael Godfrey <godfrey>
Project Member
Fri 15 Mar 2013 05:43:13 AM UTC, comment #6:

Fixed by new patch from John.

Michael Godfrey <godfrey>
Project Member
Fri 15 Mar 2013 05:12:16 AM UTC, comment #5:

With latest:
[pbdsl3:octave] hg id
e608de76742c tip

I get new fail in gzip when running make check
test/fntests.log snip attached.

(file #27606)

Michael Godfrey <godfrey>
Project Member
Fri 15 Mar 2013 03:58:42 AM UTC, comment #4:

I think the following changeset fixes the problem with line endings and anonymous functions.


The following changeset was also needed because now the body of an anonymous function is treated like any other expression and can't span multiple lines unless it is enclosed in parens or a continuation marker is used.


John W. Eaton <jwe>
Project Administrator
Thu 14 Mar 2013 03:26:10 PM UTC, comment #3:

The new parser, which is causing an assertion failure on some platforms with functions defined on the command line, exhibits this bug in a new way.

With a recent tip (a4af67e0d22c), I now get the following

Another change, which may be a red herring, is that I had to add a semicolon on the next line to tell the parser that input was complete. Previously the newline was enough as the function definition was complete.

Rik <rik5>
Project Administrator
Wed 11 Apr 2012 05:41:56 PM UTC, comment #2:

A small consolation indeed.

Rik <rik5>
Project Administrator
Wed 11 Apr 2012 01:46:11 PM UTC, comment #1:

This isn't a segfault. It's a failed assertion. Still a crash, but at least it's not UB. :-)

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Tue 10 Apr 2012 11:00:07 PM UTC, original submission:

Sample code to reproduce the problem:

The first example works. The second which extends across a newline does not. It is not necessary to run them in this order. Running just the newline version causes a segfault in all versions I have available for testing from 3.2.4 to the current tip.

Rik <rik5>
Project Administrator


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

Attach Files:

Attached Files
file #27606:  new_f added by godfrey (2KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by godfrey (Updated the item)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by rik5 (Submitted the item)

    Do you think this task is very important?
    If so, you can 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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-23 rik5 StatusConfirmed => Fixed
        Open/ClosedOpen => Closed
    2013-03-15 godfrey Attached File- => Added new_f, #27606
    2013-03-14 rik5 Carbon-Copy- => Added jwe
    2012-04-14 rik5 StatusNone => Confirmed
    2012-04-11 jordigh SummarySegfault in interpreter with anonymous functions => Failed assertion in interpreter with anonymous functions

    Back to the top

    Powered by Savane 3.3