[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35154] Memory leak and odd behavior with eval
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #35154] Memory leak and odd behavior with eval() on development tip |
Date: |
Thu, 22 Dec 2011 20:59:10 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20100101 Firefox/5.0 |
URL:
<http://savannah.gnu.org/bugs/?35154>
Summary: Memory leak and odd behavior with eval() on
development tip
Project: GNU Octave
Submitted by: rik5
Submitted on: Thu 22 Dec 2011 12:59:09 PM PST
Category: Interpreter
Severity: 4 - Important
Priority: 5 - Normal
Item Group: Performance
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
I've discovered some odd behavior with eval().
First, there is a memory leak caught by valgrind with this simple code.
eval("switch 1 default 1; endswitch")
I have attached the valgrind log.
The second issue, which may be related to the memory leak, is that eval()
appears to evaluate the code twice if an error condition is found.
For example:
octave:3> x = eval ('1b*0')
parse error:
syntax error
>>> 1b*0
^
parse error:
syntax error
>>> 1b*0
^
This looks to be related to parsing because it depends on the operation
involved (+,-,/,*) and whether it is the final parse unit which returns an
error.
More sample code:
octave:3> x = eval ('0*1b')
parse error:
syntax error
>>> 0*1b
^
In this case there is only one parse error when the problem parse unit comes
second. Similarly,
octave:3> x = eval ('1b+0')
parse error:
syntax error
>>> 1b+0
^
displays only one error because the operation has been changed from '*' to
'+'.
This is all very strange.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 22 Dec 2011 12:59:09 PM PST Name: valgrind.log Size: 37kB By:
rik5
<http://savannah.gnu.org/bugs/download.php?file_id=24652>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35154>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #35154] Memory leak and odd behavior with eval() on development tip,
Rik <=