octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #37360] Assertion and abort from CLI with cell


From: Rik
Subject: [Octave-bug-tracker] [bug #37360] Assertion and abort from CLI with cellfun and anonymous functions
Date: Sat, 15 Sep 2012 20:17:14 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:15.0) Gecko/20100101 Firefox/15.0.1

URL:
  <http://savannah.gnu.org/bugs/?37360>

                 Summary: Assertion and abort from CLI with cellfun and
anonymous functions
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Sat 15 Sep 2012 01:17:14 PM PDT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Crash
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37360>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]