I'm unable to reproduce this double-free error in Octave 3.8.2 or in the
current Octave 4.0.0. The memory error seems to be occurring while
Octave is already exiting normally, bu failing to clean up as it
normally does.

FTR the relevant part of the linked stack trace at the time of the crash
looks like this:

#0  0x00007f70b688d267 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:55
#1  0x00007f70b688eeca in __GI_abort () at abort.c:89
#2  0x00007f70b7c1134a in my_friendly_exit (sig_name=<optimized out>, 
sig_number=<optimized out>, save_vars=true) at corefcn/sighandlers.cc:333
#3  <signal handler called>
#4  0x00007f70b7acee2c in octave_value::is_defined (this=0x7ffcc247c680) at 
./octave-value/ov.h:514
#5  symbol_table::symbol_record::symbol_record_rep::is_defined (context=0, 
this=<optimized out>) at corefcn/symtab.h:368
#6  symbol_table::symbol_record::is_defined (context=0, this=0xc94158) at 
corefcn/symtab.h:589
#7  symbol_table::do_all_variables (exclude=8, defined_only=true, context=0, 
this=0xe726a0) at corefcn/symtab.h:2775
#8  symbol_table::all_variables (exclude=8, defined_only=true, context=0, 
scope=<optimized out>) at corefcn/symtab.h:1937
#9  dump_octave_core (os=..., fname=fname@entry=0xbfbcc8 "octave-workspace", 
fmt=..., save_as_floats=false) at corefcn/load-save.cc:1365
#10 0x00007f70b7ad1ae5 in dump_octave_core () at corefcn/load-save.cc:1481
#11 0x00007f70b7c112dc in my_friendly_exit (sig_name=0x7f70b69e4f24 "Aborted", 
sig_number=6, save_vars=true) at corefcn/sighandlers.cc:342
#12 <signal handler called>
#13 0x00007f70b688d267 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/unix/sysv/linux/raise.c:55
#14 0x00007f70b688eeca in __GI_abort () at abort.c:89
#15 0x00007f70b68d0c53 in __libc_message (do_abort=do_abort@entry=1, 
fmt=fmt@entry=0x7f70b69e91a8 "*** Error in `%s': %s: 0x%s ***\n") at 
../sysdeps/posix/libc_fatal.c:175
#16 0x00007f70b68d8c69 in malloc_printerr (ptr=<optimized out>, 
str=0x7f70b69e9270 "double free or corruption (fasttop)", action=1) at 
malloc.c:4965
#17 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0) at 
malloc.c:3834
#18 0x00007f70b68dc89c in __GI___libc_free (mem=<optimized out>) at 
malloc.c:2950
#19 0x00007f70b767d4c2 in std::string::_Rep::_M_dispose (__a=..., 
this=<optimized out>) at octave-value/ov-fcn-handle.h:70
#20 std::basic_string<char, std::char_traits<char>, std::allocator<char> 
>::~basic_string (this=0x1322e10, __in_chrg=<optimized out>) at 
/usr/include/c++/4.9/bits/basic_string.h:547
#21 octave_fcn_handle::~octave_fcn_handle (this=0x1322df0, __in_chrg=<optimized 
out>) at octave-value/ov-fcn-handle.h:70
#22 0x00007f70b767d529 in octave_fcn_handle::~octave_fcn_handle 
(this=0x1322df0, __in_chrg=<optimized out>) at octave-value/ov-fcn-handle.h:70
#23 0x00007f70b7aaa2fe in octave_value::~octave_value (this=0x12ee850, 
__in_chrg=<optimized out>) at ./octave-value/ov.h:318
#24 fcn_handle_hook_function::~fcn_handle_hook_function (this=0x12ee830, 
__in_chrg=<optimized out>) at corefcn/hook-fcn.h:144
#25 fcn_handle_hook_function::~fcn_handle_hook_function (this=0x12ee830, 
__in_chrg=<optimized out>) at corefcn/hook-fcn.h:144
#26 0x00007f70b7ab1c39 in hook_function::~hook_function (this=0x1322528, 
__in_chrg=<optimized out>) at corefcn/hook-fcn.h:76
#27 std::pair<std::basic_string<char, std::char_traits<char>, 
std::allocator<char> > const, hook_function>::~pair (this=0x1322520, 
__in_chrg=<optimized out>) at /usr/include/c++/4.9/bits/stl_pair.h:96
#28 __gnu_cxx::new_allocator<std::pair<std::string const, hook_function> 
>::destroy (this=<optimized out>, __p=0x1322520) at 
/usr/include/c++/4.9/ext/new_allocator.h:133
#29 std::_Rb_tree<std::string, std::pair<std::string const, hook_function>, 
std::_Select1st<std::pair<std::string const, hook_function> >, 
std::less<std::string>, std::allocator<std::pair<std::string const, 
hook_function> > >::_M_destroy_node (this=0x7f70b8239420 
<input_event_hook_functions>, __p=0x1322500) at 
/usr/include/c++/4.9/bits/stl_tree.h:409
#30 std::_Rb_tree<std::string, std::pair<std::string const, hook_function>, 
std::_Select1st<std::pair<std::string const, hook_function> >, 
std::less<std::string>, std::allocator<std::pair<std::string const, 
hook_function> > >::_M_erase (this=this@entry=0x7f70b8239420 
<input_event_hook_functions>, __x=0x1322500) at 
/usr/include/c++/4.9/bits/stl_tree.h:1247
#31 0x00007f70b7aae607 in std::_Rb_tree<std::string, std::pair<std::string 
const, hook_function>, std::_Select1st<std::pair<std::string const, 
hook_function> >, std::less<std::string>, std::allocator<std::pair<std::string 
const, hook_function> > >::clear (this=0x7f70b8239420 
<input_event_hook_functions>) at /usr/include/c++/4.9/bits/stl_tree.h:908
#32 std::map<std::string, hook_function, std::less<std::string>, 
std::allocator<std::pair<std::string const, hook_function> > >::clear 
(this=0x7f70b8239420 <input_event_hook_functions>) at 
/usr/include/c++/4.9/bits/stl_map.h:827
#33 hook_function_list::clear (this=0x7f70b8239420 
<input_event_hook_functions>) at corefcn/hook-fcn.h:216
#34 remove_input_event_hook_functions () at corefcn/input.cc:134
#35 0x00007f70b7c9ae6a in do_octave_atexit () at corefcn/toplev.cc:646
#36 0x00007f70b7c9e4df in clean_up_and_exit (retval=0, 
safe_to_return=<optimized out>) at corefcn/toplev.cc:730
#37 <signal handler called>
#38 0x00007f70b688d597 in kill () at ../sysdeps/unix/syscall-template.S:81
#39 0x00007f70b13e8a2a in _rl_handle_signal (sig=20) at 
/build/buildd/readline6-6.3/signals.c:249
#40 0x00007f70b13eb137 in rl_read_key () at 
/build/buildd/readline6-6.3/input.c:453
#41 0x00007f70b13d40d5 in _rl_subseq_getchar (key=key@entry=24) at 
/build/buildd/readline6-6.3/readline.c:708
#42 0x00007f70b13d4b01 in _rl_dispatch_subseq (key=24, map=0x7f70b1604500 
<emacs_standard_keymap>, got_subseq=0) at 
/build/buildd/readline6-6.3/readline.c:938
#43 0x00007f70b13d4da1 in _rl_dispatch (key=<optimized out>, map=<optimized 
out>) at /build/buildd/readline6-6.3/readline.c:775
#44 0x00007f70b13d4e4e in readline_internal_char () at 
/build/buildd/readline6-6.3/readline.c:602
#45 0x00007f70b13d5595 in readline_internal_charloop () at 
/build/buildd/readline6-6.3/readline.c:629
#46 readline_internal () at /build/buildd/readline6-6.3/readline.c:643
#47 readline (prompt=<optimized out>) at 
/build/buildd/readline6-6.3/readline.c:369


** Changed in: octave (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1489115

Title:
  /usr/bin/octave-cli:*** Error in `/usr/bin/octave-cli': double free or
  corruption (fasttop): ADDR ***

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/octave/+bug/1489115/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to