bugGNU Octave - Bugs: bug #52021, Memory problems detected by...

 
 

bug #52021: Memory problems detected by Address Sanitizer in Variable Editor

Submitted by:  Rik <rik5>
Submitted on:  Thu 14 Sep 2017 07:35:39 PM UTC  
 
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: NoneAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 20 Sep 2017 05:55:35 AM UTC, comment #2:

This may be a race issue. At some points the "str" variable, say in input.h:188, appears to be garbage and very large. It looks like it is supposed to be "", but even that is dumb because why would you eval() an empty string?

Rik <rik5>
Project Administrator
Thu 14 Sep 2017 10:02:23 PM UTC, comment #1:

(I posted this under wrong bug number
https://savannah.gnu.org/bugs/?52026 )
So, reposting here:

I cannot compile f50ef29d874e tip @ with asan:

LD_PRELOAD="libasan.so.4:libGLX_mesa.so.0" make V=1
rm -f bits/stl_algo.h
make all-recursive
make[1]: Entering directory '/d2/home/dima/src/octave/gcc_asan'
Making all in libgnu
make[2]: Entering directory '/d2/home/dima/src/octave/gcc_asan/libgnu'
make all-recursive
make[3]: Entering directory '/d2/home/dima/src/octave/gcc_asan/libgnu'
make[4]: Entering directory '/d2/home/dima/src/octave/gcc_asan/libgnu'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/d2/home/dima/src/octave/gcc_asan/libgnu'
make[3]: Leaving directory '/d2/home/dima/src/octave/gcc_asan/libgnu'
make[2]: Leaving directory '/d2/home/dima/src/octave/gcc_asan/libgnu'
make[2]: Entering directory '/d2/home/dima/src/octave/gcc_asan'
rm -f doc/interpreter/plot-imageproperties.texi-t doc/interpreter/plot-imageproperties.texi && /bin/sh run-octave --norc --silent --no-history --path ../doc/interpreter --eval "genpropdoc ('image');" > doc/interpreter/plot-imageproperties.texi-t && mv doc/interpreter/plot-imageproperties.texi-t doc/interpreter/plot-imageproperties.texi
=================================================================
==3383==ERROR: AddressSanitizer: stack-use-after-scope on address 0x7f41d2d03640 at pc 0x7f420544c4ba bp 0x7f41d2d03500 sp 0x7f41d2d02ca8
WRITE of size 128 at 0x7f41d2d03640 thread T6 (QThread)
#0 0x7f420544c4b9 (/lib64/libasan.so.4+0x394b9)
#1 0x7f4200284a0a in octave_set_signal_handler_internal ../liboctave/wrappers/signal-wrappers.c:368
#2 0x7f4200284c15 in octave_set_signal_handler_by_name ../liboctave/wrappers/signal-wrappers.c:384
#3 0x7f4203e6c01e in octave::set_signal_handler(char const, void ()(int), bool) ../libinterp/corefcn/sighandlers.cc:420
#4 0x7f4203e6c8a1 in octave::catch_interrupts() ../libinterp/corefcn/sighandlers.cc:565
#5 0x7f4203ba3a40 in octave::interpreter::recover_from_exception() ../libinterp/corefcn/interpreter.cc:1257
#6 0x7f420345bdef in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:2374
#7 0x7f420348ee4c in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:80
#8 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#9 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#10 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#11 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#12 0x7f420344d848 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:1073
#13 0x7f4203437bcc in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:116
#14 0x7f420344d4d4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:1052
#15 0x7f42034a9ff4 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:149
#16 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#17 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#18 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#19 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#20 0x7f420344a9ba in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:782
#21 0x7f420349d4ee in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:223
#22 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#23 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#24 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#25 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#26 0x7f420325261a in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:647
#27 0x7f420344f166 in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) ../libinterp/parse-tree/pt-eval.cc:1252
#28 0x7f4203496b9c in octave::tree_index_expression::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-idx.h:101
#29 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#30 0x7f420345e060 in octave::tree_evaluator::is_logically_true(octave::tree_expression, char const) ../libinterp/parse-tree/pt-eval.cc:2782
#31 0x7f420344d7fb in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:1068
#32 0x7f4203437bcc in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:116
#33 0x7f420344d4d4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:1052
#34 0x7f42034a9ff4 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:149
#35 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#36 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#37 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#38 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#39 0x7f420344d848 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:1073
#40 0x7f4203437bcc in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:116
#41 0x7f420344d4d4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:1052
#42 0x7f42034a9ff4 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:149
#43 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#44 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#45 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#46 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#47 0x7f420345af0a in octave::tree_evaluator::visit_switch_command(octave::tree_switch_command&) ../libinterp/parse-tree/pt-eval.cc:2327
#48 0x7f42034aa0dc in octave::tree_switch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:277
#49 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#50 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#51 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#52 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#53 0x7f420325261a in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:647
#54 0x7f420344f166 in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) ../libinterp/parse-tree/pt-eval.cc:1252
#55 0x7f4203496b9c in octave::tree_index_expression::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-idx.h:101
#56 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#57 0x7f4203458ce1 in octave::tree_evaluator::visit_simple_assignment(octave::tree_simple_assignment&) ../libinterp/parse-tree/pt-eval.cc:2085
#58 0x7f4203433964 in octave::tree_simple_assignment::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-assign.h:83
#59 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#60 0x7f420345a3d0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2209
#61 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#62 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#63 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#64 0x7f420344d848 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:1073
#65 0x7f4203437bcc in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:116
#66 0x7f420344d4d4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:1052
#67 0x7f42034a9ff4 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:149
#68 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#69 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#70 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#71 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#72 0x7f420345c7fd in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:2510
#73 0x7f420348eec0 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:145
#74 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#75 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#76 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#77 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#78 0x7f420325261a in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:647
#79 0x7f420344f166 in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) ../libinterp/parse-tree/pt-eval.cc:1252
#80 0x7f4203496b9c in octave::tree_index_expression::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-idx.h:101
#81 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#82 0x7f4203458ce1 in octave::tree_evaluator::visit_simple_assignment(octave::tree_simple_assignment&) ../libinterp/parse-tree/pt-eval.cc:2085
#83 0x7f4203433964 in octave::tree_simple_assignment::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-assign.h:83
#84 0x7f420325d358 in octave::tree_evaluator::evaluate_n(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:284
#85 0x7f42033fa5dc in octave::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) libinterp/parse-tree/oct-parse.yy:5353
#86 0x7f42033fae9a in eval_string libinterp/parse-tree/oct-parse.yy:5399
#87 0x7f42033fb2aa in Feval(octave_value_list const&, int) libinterp/parse-tree/oct-parse.yy:5476
#88 0x7f4202ff9467 in octave_builtin::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
#89 0x7f420344f166 in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) ../libinterp/parse-tree/pt-eval.cc:1252
#90 0x7f4203496b9c in octave::tree_index_expression::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-idx.h:101
#91 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#92 0x7f420345a3d0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2209
#93 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#94 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#95 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#96 0x7f420344d848 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:1073
#97 0x7f4203437bcc in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:116
#98 0x7f420344d4d4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:1052
#99 0x7f42034a9ff4 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:149
#100 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#101 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#102 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#103 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#104 0x7f420325261a in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:647
#105 0x7f420344f166 in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) ../libinterp/parse-tree/pt-eval.cc:1252
#106 0x7f4203496b9c in octave::tree_index_expression::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-idx.h:101
#107 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#108 0x7f4203458ce1 in octave::tree_evaluator::visit_simple_assignment(octave::tree_simple_assignment&) ../libinterp/parse-tree/pt-eval.cc:2085
#109 0x7f4203433964 in octave::tree_simple_assignment::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-assign.h:83
#110 0x7f42030bf0e6 in octave::tree_evaluator::evaluate(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:271
#111 0x7f420345a3d0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2209
#112 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#113 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#114 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#115 0x7f420344d848 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:1073
#116 0x7f4203437bcc in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:116
#117 0x7f420344d4d4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:1052
#118 0x7f42034a9ff4 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:149
#119 0x7f420345a0ba in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2176
#120 0x7f42034ad246 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:112
#121 0x7f420345a7d8 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2251
#122 0x7f42030bfb2c in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:187
#123 0x7f420325261a in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:647
#124 0x7f420344f166 in octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&) ../libinterp/parse-tree/pt-eval.cc:1252
#125 0x7f4203496b9c in octave::tree_index_expression::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-idx.h:101
#126 0x7f420325d358 in octave::tree_evaluator::evaluate_n(octave::tree_expression*, int) ../libinterp/parse-tree/pt-eval.h:284
#127 0x7f42033fa5dc in octave::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) libinterp/parse-tree/oct-parse.yy:5353
#128 0x7f4203b9ea28 in octave::interpreter::execute_eval_option_code() ../libinterp/corefcn/interpreter.cc:858
#129 0x7f4203b9c9fa in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:663
#130 0x7f4204aff95d in octave_interpreter::execute() ../libgui/src/main-window.cc:128
#131 0x7f4204c96160 in octave_interpreter::qt_static_metacall(QObject, QMetaObject::Call, int, void*) libgui/src/moc-main-window.cc:86
#132 0x7f42010908d9 in QObject::event(QEvent*) (/lib64/libQt5Core.so.5+0x26f8d9)
#133 0x7f42018b35db in QApplicationPrivate::notify_helper(QObject, QEvent) (/lib64/libQt5Widgets.so.5+0x15a5db)
#134 0x7f42018bac73 in QApplication::notify(QObject, QEvent) (/lib64/libQt5Widgets.so.5+0x161c73)
#135 0x7f4201068626 in QCoreApplication::notifyInternal2(QObject, QEvent) (/lib64/libQt5Core.so.5+0x247626)
#136 0x7f420106a85a in QCoreApplicationPrivate::sendPostedEvents(QObject, int, QThreadData) (/lib64/libQt5Core.so.5+0x24985a)
#137 0x7f42010b6dd2 (/lib64/libQt5Core.so.5+0x295dd2)
#138 0x7f41f0682246 in g_main_context_dispatch (/lib64/libglib-2.0.so.0+0x4a246)
#139 0x7f41f06825e7 (/lib64/libglib-2.0.so.0+0x4a5e7)
#140 0x7f41f068267b in g_main_context_iteration (/lib64/libglib-2.0.so.0+0x4a67b)
#141 0x7f42010b6e4e in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/lib64/libQt5Core.so.5+0x295e4e)
#142 0x7f4201067609 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/lib64/libQt5Core.so.5+0x246609)
#143 0x7f4200ebf999 in QThread::exec() (/lib64/libQt5Core.so.5+0x9e999)
#144 0x7f4200ec3c9d (/lib64/libQt5Core.so.5+0xa2c9d)
#145 0x7f41f670236c in start_thread (/lib64/libpthread.so.0+0x736c)
#146 0x7f41f643abbe in __GI___clone (/lib64/libc.so.6+0x110bbe)

Address 0x7f41d2d03640 is located in stack of thread T6 (QThread) at offset 288 in frame
#0 0x7f4200284858 in octave_set_signal_handler_internal ../liboctave/wrappers/signal-wrappers.c:344

This frame has 2 object(s):
[32, 184) 'act'
[224, 376) 'oact' <== Memory access at offset 288 partially overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
(longjmp and C++ exceptions are supported)
Thread T6 (QThread) created by T0 here:
#0 0x7f420544aa2f in pthread_create (/lib64/libasan.so.4+0x37a2f)
#1 0x7f4200ec3235 in QThread::start(QThread::Priority) (/lib64/libQt5Core.so.5+0xa2235)

SUMMARY: AddressSanitizer: stack-use-after-scope (/lib64/libasan.so.4+0x394b9)
Shadow bytes around the buggy address:
0x0fe8ba598670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe8ba598680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe8ba598690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0fe8ba5986a0: 00 00 00 00 f1 f1 f1 f1 00 00 00 00 00 00 00 00
0x0fe8ba5986b0: 00 00 00 00 00 00 00 00 00 00 00 f2 f2 f2 f2 f2
=>0x0fe8ba5986c0: 00 00 00 00 00 00 00 00[f8]00 00 00 00 00 00 00
0x0fe8ba5986d0: 00 00 00 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00
0x0fe8ba5986e0: 00 00 f1 f1 f1 f1 04 f2 f2 f2 f3 f3 f3 f3 00 00
0x0fe8ba5986f0: 00 00 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00
0x0fe8ba598700: f2 f2 f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00
0x0fe8ba598710: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==3383==ABORTING
make[2]: *** [Makefile:27802: doc/interpreter/plot-imageproperties.texi] Error 1
make[2]: Leaving directory '/d2/home/dima/src/octave/gcc_asan'
make[1]: *** [Makefile:26462: all-recursive] Error 1
make[1]: Leaving directory '/d2/home/dima/src/octave/gcc_asan'
make: *** [Makefile:10183: all] Error 2

Dmitri A. Sergatskov <dasergatskov>
Thu 14 Sep 2017 07:35:39 PM UTC, original submission:

After compiling a version of Octave with the AddressSanitizer enabled (see http://wiki.octave.org/Finding_Memory_Leaks), I tried using the Variable Editor which produced a nasty warning and termination of the program. The Octave code was

The warning was:

Since that was only a warning, I did as suggested and set the ASAN_OPTIONS variable to include allocator_may_return_null=1. When I run again, I get an even worse error.

Rik <rik5>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by dasergatskov (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1