bugGNU Octave - Bugs: bug #37360, Assertion and abort from CLI with...

 
 

bug #37360: Assertion and abort from CLI with cellfun and anonymous functions

Submitter:  Rik <rik5>
Submitted:  Sat 15 Sep 2012 08:17:14 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
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
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 20 Jun 2013 12:25:26 AM UTC, comment #1: 

Fixed as of 6/19/13 in the development code.

Rik <rik5>
Group administrator
Sat 15 Sep 2012 08:17:14 PM UTC, original submission:  

This fragment of code typed on the command line causes and assertion and immediate ejection from Octave.


cellfun (@(x) sin (x, c2)
> )
�: interpfcn/symtab.h:2079: static void symbol_table::set_curr_fcn(octave_user_function*, int): Assertion `scope != xtop_scope && scope != xglobal_scope' failed.
Abort


The first line needs to be typed and <RETURN> hit.  Octave recognizes that the cellfun function call has not been closed so it prompts for extra input with '>'.  Close the cellfun declaration with ')' and hit <RETURN>.

In terms of parsing, the call to sin() should have been closed immediately.

In fact a little testing shows that anonymous functions which cross newline boundaries are a general problem.  The following code also aborts.


myf = @(x) x + ...
1
: interpfcn/symtab.h:2079: static void symbol_table::set_curr_fcn(octave_user_function*, int): Assertion `scope != xtop_scope && scope != xglobal_scope' failed.
Abort


Rik <rik5>
Group administrator

 

(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 (Submitted the item)
  •  

    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 group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-06-20 rik5 StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code