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

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

[Octave-bug-tracker] [bug #35876] Saving anonymous functions fails in re


From: Max Brister
Subject: [Octave-bug-tracker] [bug #35876] Saving anonymous functions fails in recursive functions
Date: Sat, 17 Mar 2012 16:55:40 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11

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

                 Summary: Saving anonymous functions fails in recursive
functions
                 Project: GNU Octave
            Submitted by: fisheater
            Submitted on: Sat 17 Mar 2012 04:55:39 PM GMT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Max Brister
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: Any

    _______________________________________________________

Details:

Saving an anonymous function fails whenever symbol_table::current_context ()
is nonzero. I have attached a script which exhibits this functionality.

save_test (1)

fails as it is called when current_context is nonzero but

save_test (0)

works as current_context is zero.

I have also attached a patch that fixes this issue in addition to adding a
test case. The fix is to call varval (0) when saving the variables of an
anonymous function. This causes the anonymous function's variables to
correctly be accessed from context 0, instead of the current_context.

I am guessing this bug also appears in any previous release that allows for
anonymous functions to be saved, but I have not checked.

Max Brister



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 17 Mar 2012 04:55:39 PM GMT  Name: save_test.m  Size: 150B   By:
fisheater

<http://savannah.gnu.org/bugs/download.php?file_id=25382>
-------------------------------------------------------
Date: Sat 17 Mar 2012 04:55:39 PM GMT  Name: anon.patch  Size: 3kB   By:
fisheater

<http://savannah.gnu.org/bugs/download.php?file_id=25383>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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