[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file |
Date: |
Thu, 20 Jan 2022 23:37:20 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:96.0) Gecko/20100101 Firefox/96.0 |
Follow-up Comment #10, bug #61821 (project octave):
Inspecting function arguments and return values shows that
octave_user_function::define_ret_list() doesn't work correctly. The function
signature is:
octave_user_function *
octave_user_function::define_ret_list (octave::tree_parameter_list *t)
{
m_ret_list = t;
return this;
}
I extracted the disassembly of "define_ret_list" both for Octave 6.3.0 and
7.0.90 (It's the first time I am using assembly):
Octave 6.3.0
0x00edabb0 <+0>: mov 0x4(%esp),%edx
0x00edabb4 <+4>: mov %ecx,%eax
0x00edabb6 <+6>: mov %edx,0xc0(%ecx)
0x00edabbc <+12>: ret $0x4
0x00edabbf <+15>: nop
Octave 7.0.90
0x00df95a0 <+0>: mov 0x4(%esp),%edx
0x00df95a4 <+4>: mov %ecx,%eax
0x00df95a6 <+6>: mov %edx,0xd4(%ecx)
0x00df95ac <+12>: ret $0x4
0x00df95af <+15>: nop
It computes the offset of "m_ret_list" from the beginning of the class and
puts "t" in that address. In Octave 6.3.0 the offset is correctly computed as
0xc0 while for Octave 7.0.90 it wrongly computed as 0xd4, therefore
define_ret_list(t) puts "t" in a wrong address. Actually instead of changing
the member "m_ret_list" it changes "m_end_location_line".
It appears that GCC 11.2.0 that bundled with Octave 7.0.90 has a bug.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61821>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, (continued)
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Kai Torben Ohlhus, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, anonymous, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Kai Torben Ohlhus, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Kai Torben Ohlhus, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, anonymous, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file, Markus Mützel, 2022/01/17
- [Octave-bug-tracker] [bug #61821] segfault using tree_parameter_list in oct file,
anonymous <=