[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #41945] Segfault when subsasgn returns nothing
From: |
Andreas Weber |
Subject: |
[Octave-bug-tracker] [bug #41945] Segfault when subsasgn returns nothing in user-defined class |
Date: |
Mon, 24 Mar 2014 15:45:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20140205 Firefox/24.0 Iceweasel/24.3.0 |
URL:
<http://savannah.gnu.org/bugs/?41945>
Summary: Segfault when subsasgn returns nothing in
user-defined class
Project: GNU Octave
Submitted by: andy1978
Submitted on: Mo 24 Mär 2014 15:45:48 GMT
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: 3.8.1
Operating System: GNU/Linux
_______________________________________________________
Details:
When playing with user-defined classes I get a segfault when there is no
return from @myclass/subasgn
function r = myclass (a)
tmp.value = 123;
r = class (tmp, "myclass");
endfunction
function display(c)
fprintf("This is myclass with value=%d\n", c.value);
endfunction
function subsasgn (val, idx, rhs)
val
idx
rhs
endfunction
octave:1> x=myclass(3)
This is myclass with value=123
octave:2> x(4)=5
panic: Segmentation fault -- stopping myself...
attempting to save variables to 'octave-workspace'...
save to 'octave-workspace' complete
Speicherzugriffsfehler
I think implementing subsasgn in a user-defined class without return value
(like my example above) doesn't make sense but nevertheless octave shouldn't
segfault.
-- Andy
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mo 24 Mär 2014 15:45:48 GMT Name: myclass.tar.gz Size: 355B By:
andy1978
<http://savannah.gnu.org/bugs/download.php?file_id=31024>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?41945>
_______________________________________________
Nachricht gesendet von/durch Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #41945] Segfault when subsasgn returns nothing in user-defined class,
Andreas Weber <=