bugGNU Octave - Bugs: bug #52026, I tried the address sanitizer and...

 
 

bug #52026: I tried the address sanitizer and got this at startup.

Submitter:  Doug Stewart <dastew>
Submitted:  Thu 14 Sep 2017 08:25:09 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Doug stewart Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 15 Sep 2017 03:18:37 AM UTC, comment #4: 

@Dmitri: Maybe try configuring with --disable-docs as well and see if that will at least allow you to build Octave.

Rik <rik5>
Group administrator
Thu 14 Sep 2017 09:57:02 PM UTC, comment #3: 

I cannot even compile the
f50ef29d874e tip @
<<<<
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 08:52:06 PM UTC, comment #2: 

This can be close.
the problem was fixed by Rik before I reported it!

Doug Stewart <dastew>
Thu 14 Sep 2017 08:32:32 PM UTC, comment #1: 

Did you build with a version >= to 24043?


changeset:   24043:f50ef29d874e
user:        Rik <rik@octave.org>
date:        Thu Sep 14 09:02:07 2017 -0700
summary:     Fix heap-buffer-overflow in GUI terminal code (51948).


I fixed just such a problem this morning.

Rik <rik5>
Group administrator
Thu 14 Sep 2017 08:25:09 PM UTC, original submission:  

I built with the instructions from
http://wiki.octave.org/Finding_Memory_Leaks



Octave successfully built.  Now choose from the following:

   ./run-octave    - to run in place to test before installing
   make check      - to run the tests
   make install    - to install (PREFIX=/home/user/local)

   HG ID for this build is "2ae8efbafb58+"

make[2]: Leaving directory '/home/doug/octavec4'
make[1]: Leaving directory '/home/doug/octavec4'

real        17m35.081s
user        60m56.148s
sys        2m26.572s
doug@doug-sp2:~/octavec4$ ./run-octave
=================================================================
==5019==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61900018f540 at pc 0x7f6270e8b935 bp 0x7ffd3fa33030 sp 0x7ffd3fa327d8
READ of size 948 at 0x61900018f540 thread T0
GNU Octave, version 4.3.0+
Copyright (C) 2016 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

    #0 0x7f6270e8b934 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c934)
    #1 0x7f62707fb9bf in memcpy /usr/include/x86_64-linux-gnu/bits/string3.h:53
    #2 0x7f62707fb9bf in TerminalView::updateImage() libgui/qterminal/libqterminal/unix/TerminalView.cpp:973
    #3 0x7f62707ea4b9 in QUnixTerminalImpl::resizeEvent(QResizeEvent*) libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp:228
    #4 0x7f626a0428cf in QWidget::event(QEvent*) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x21b8cf)
    #5 0x7f6269febfdb in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1c4fdb)
    #6 0x7f6269ff2f15 in QApplication::notify(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x1cbf15)
    #7 0x7f6269abe90c in QCoreApplication::notifyInternal(QObject*, QEvent*) (/usr/lib/x86_64-linux-gnu/libQtCore.so.4+0x18a90c)
    #8 0x7f626a03ea50 in QWidgetPrivate::sendPendingMoveAndResizeEvents(bool, bool) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x217a50)
    #9 0x7f626a03fbd2 in QWidgetPrivate::show_helper() (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x218bd2)
    #10 0x7f626a03fb11 in QWidgetPrivate::showChildren(bool) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x218b11)
    #11 0x7f626a03fbee in QWidgetPrivate::show_helper() (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x218bee)
    #12 0x7f626a03fb11 in QWidgetPrivate::showChildren(bool) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x218b11)
    #13 0x7f626a03fbee in QWidgetPrivate::show_helper() (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x218bee)
    #14 0x7f626a041c09 in QWidget::setVisible(bool) (/usr/lib/x86_64-linux-gnu/libQtGui.so.4+0x21ac09)
    #15 0x7f6270883aba in QWidget::show() /usr/include/qt4/QtGui/qwidget.h:497
    #16 0x7f6270883aba in main_window::set_window_layout(QSettings*) libgui/src/main-window.cc:1237
    #17 0x7f62708847e2 in main_window::read_settings() libgui/src/main-window.cc:1167
    #18 0x7f62708a3acb in octave::gui_application::execute() libgui/src/octave-gui.cc:232
    #19 0x40180e in main src/main-gui.cc:104
    #20 0x7f626b8bc82f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #21 0x401d48 in _start (/home/doug/octavec4/src/.libs/lt-octave-gui+0x401d48)

0x61900018f540 is located 0 bytes to the right of 960-byte region [0x61900018f180,0x61900018f540)
allocated by thread T0 here:
    #0 0x7f6270e986b2 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x996b2)
    #1 0x7f62707ef14c in ScreenWindow::getImage() libgui/qterminal/libqterminal/unix/ScreenWindow.cpp:67

SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __asan_memcpy
Shadow bytes around the buggy address:
  0x0c3280029e50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3280029e60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3280029e70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3280029e80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c3280029e90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c3280029ea0: 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa
  0x0c3280029eb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3280029ec0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3280029ed0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3280029ee0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c3280029ef0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
  Heap right redzone:      fb
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack partial redzone:   f4
  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
==5019==ABORTING
doug@doug-sp2:~/octavec4$



Doug Stewart <dastew>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-09-15 rik5 StatusNeed Info Fixed
        Open/ClosedOpen Closed
    2017-09-14 rik5 CategoryNone Interpreter
        Item GroupUnexpected Error or Warning Segfault, Bus Error, etc.
        StatusNone Need Info

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code