bugGNU Octave - Bugs: bug #62207, segfault in...

 
 

bug #62207: segfault in bug-35881/bug-35881.tst in 32-bit ARM and MIPS

Submitter:  Sébastien Villemot <svillemot>
Submitted:  Mon 21 Mar 2022 10:58:32 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 7.0.92 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Tue 12 Apr 2022 12:43:40 PM UTC, comment #60: 

I'm assuming this no longer occurs with the tarball for the 7.1.0 release. If it still occurs, please comment and we'll re-open.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Mon 04 Apr 2022 04:23:22 AM UTC, comment #59: 

OK, I pushed the following change on stable and merged with default.

http://hg.savannah.gnu.org/hgweb/octave/rev/05328c2145ff

Thanks for all your help testing these patches.

I'm marking as ready for test.  I hope these recent changes will also allow the test suite to pass on Debian MIPS systems.

John W. Eaton <jwe>
Group administrator
Mon 04 Apr 2022 02:57:46 AM UTC, comment #58: 

Yes, with uicontrol-mem-patch.txt 0a1aec50a0c8+ (stable)
passes make check:


Summary:

  PASS                            17060
  FAIL                                7
  REGRESSION                          1
  XFAIL (reported bug)               28
  SKIP (missing feature)            105
  SKIP (run-time condition)          52


Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Mon 04 Apr 2022 02:33:59 AM UTC, comment #57: 

Yes, with uicontrol-mem-patch.txt


octave:1> test gui/uicontrol.m
PASSES 1 out of 1 test


and I ASSume "make check" will pass (it is still running).

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Mon 04 Apr 2022 01:53:21 AM UTC, comment #56: 

This one is weird because line 3842 in pt-eval.cc is a "throw;" statement to rethrow the exception that was just caught and without even any modification.  So I don't see how that is generating a "stack use after scope" error.


Integrated test scripts:

  liboctave/array/Array.cc-tst ................................... pass   21/21
  liboctave/array/CMatrix.cc-tst ................................. pass   11/11
  liboctave/array/CSparse.cc-tst ................................. pass   10/10
  liboctave/array/Sparse.cc-tst ..................................=================================================================
==869930==ERROR: AddressSanitizer: stack-use-after-scope on address 0xff92bc1c at pc 0xf73696bc bp 0xff92bbf4 sp 0xff92b7c8
WRITE of size 12 at 0xff92bc1c thread T0
    #0 0xf73696b8 in __interceptor_sigaltstack ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986
    #1 0xf73cf548 in __asan::PlatformUnpoisonStacks() ../../../../src/libsanitizer/asan/asan_posix.cpp:44
    #2 0xf73d4a84 in __asan_handle_no_return ../../../../src/libsanitizer/asan/asan_rtl.cpp:612
    #3 0xf5de6cc0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3842


John W. Eaton <jwe>
Group administrator
Mon 04 Apr 2022 01:48:48 AM UTC, comment #55: 

I see how it might be possible for convert_position in graphics.cc to attempt an out-of-bounds array assignment but when I added some code to display the array size, testing uicontrol.m did not trigger that problem for me.  Anyway, does the attached change avoid the problem for you?


(file #53041)

John W. Eaton <jwe>
Group administrator
Mon 04 Apr 2022 12:54:28 AM UTC, comment #54: 

I also compiled aarch64 version with ASAN.

test gui/uicontrol.m crashes there as well:


octave:1> test gui/uicontrol.m
=================================================================
==985255==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xffff512fae60 at pc 0xffff8b63c158 bp 0xffffe40ed010 sp 0xffffe40ed020
WRITE of size 8 at 0xffff512fae60 thread T0
    #0 0xffff8b63c154 in convert_position ../libinterp/corefcn/graphics.cc:833
    #1 0xffff8b930578 in octave::uicontrol::properties::get_extent() const ../libinterp/corefcn/graphics.cc:11042
    #2 0xffff8b83b480 in octave::uicontrol::properties::get(bool) const libinterp/corefcn/graphics-props.cc:7252
    #3 0xffff8b98054c in octave::base_graphics_object::get(bool) const libinterp/corefcn/graphics.h:2751
    #4 0xffff8b66e4e8 in octave::base_graphics_object::remove_all_listeners() ../libinterp/corefcn/graphics.cc:3758
    #5 0xffff8b9848f4 in octave::graphics_object::remove_all_listeners() libinterp/corefcn/graphics.h:3153
    #6 0xffff8b662b50 in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2917
    #7 0xffff8b651f3c in octave::children_property::do_delete_children(bool, bool) ../libinterp/corefcn/graphics.cc:1903
    #8 0xffff8b97bcc4 in octave::children_property::delete_children(bool, bool) libinterp/corefcn/graphics.h:1781
    #9 0xffff8b97ea90 in octave::base_properties::delete_children(bool, bool) libinterp/corefcn/graphics.h:2351
    #10 0xffff8b662bb4 in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2919
    #11 0xffff8b664770 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3085
    #12 0xffff8b664b70 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3097
    #13 0xffff8b664d8c in delete_graphics_objects ../libinterp/corefcn/graphics.cc:3110
    #14 0xffff8b95f378 in octave::F__go_delete__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/graphics.cc:13663
    #15 0xffff8ad44bd8 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #16 0xffff8ae36c00 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #17 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #18 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #19 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #20 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #21 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #22 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #23 0xffff8b19d694 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #24 0xffff8b1b582c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #25 0xffff8b19d2c0 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #26 0xffff8b206f54 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #27 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #28 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #29 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #30 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #31 0xffff8b19c374 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #32 0xffff8af478a4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #33 0xffff8af476fc in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #34 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #35 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #36 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #37 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #38 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #39 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #40 0xffff8b19d694 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #41 0xffff8b1b582c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #42 0xffff8b19d2c0 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #43 0xffff8b206f54 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #44 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #45 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #46 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #47 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #48 0xffff8b19c374 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #49 0xffff8af478a4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #50 0xffff8af476fc in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #51 0xffff8b1e4dec in octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-id.cc:130
    #52 0xffff8b18737c in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #53 0xffff8ba76da4 in octave::interpreter::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/corefcn/interpreter.cc:1483
    #54 0xffff8b94b4a0 in octave::gh_manager::execute_callback(octave_handle const&, octave_value const&, octave_value const&) ../libinterp/corefcn/graphics.cc:12332
    #55 0xffff8b9dc444 in octave::gh_manager::execute_callback(octave_handle const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, octave_value const&) libinterp/corefcn/graphics.h:14370
    #56 0xffff8b9601a4 in octave::F__go_execute_callback__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/graphics.cc:13732
    #57 0xffff8ad44bd8 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #58 0xffff8ae36c00 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #59 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #60 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #61 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #62 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #63 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #64 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #65 0xffff8b198ffc in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3166
    #66 0xffff8b1f9b04 in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #67 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #68 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #69 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #70 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #71 0xffff8b19c374 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #72 0xffff8af478a4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #73 0xffff8af476fc in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #74 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #75 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #76 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #77 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #78 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #79 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #80 0xffff8b1a0b90 in octave::tree_evaluator::do_unwind_protect_cleanup_code(octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:4054
    #81 0xffff8b1a1104 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4157
    #82 0xffff8b1d8f10 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #83 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #84 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #85 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #86 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #87 0xffff8b19c374 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #88 0xffff8af478a4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #89 0xffff8af476fc in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #90 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #91 0xffff8b18737c in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #92 0xffff8b187f60 in octave::tree_evaluator::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1111
    #93 0xffff8ba77070 in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1502
    #94 0xffff8b11dcc8 in octave::Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6432
    #95 0xffff8ad44bd8 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #96 0xffff8ae36c00 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #97 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #98 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #99 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #100 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #101 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #102 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #103 0xffff8b19fab0 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #104 0xffff8b1d8e94 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #105 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #106 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #107 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #108 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #109 0xffff8b19d694 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #110 0xffff8b1b582c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #111 0xffff8b19d2c0 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #112 0xffff8b206f54 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #113 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #114 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #115 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #116 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #117 0xffff8b19d694 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #118 0xffff8b1b582c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #119 0xffff8b19d2c0 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #120 0xffff8b206f54 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #121 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #122 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #123 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #124 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #125 0xffff8b1a10f8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #126 0xffff8b1d8f10 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #127 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #128 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #129 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #130 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #131 0xffff8b198ffc in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3166
    #132 0xffff8b1f9b04 in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #133 0xffff8b19e190 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #134 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #135 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #136 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #137 0xffff8b19c374 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #138 0xffff8af478a4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #139 0xffff8af476fc in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #140 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #141 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #142 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #143 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #144 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #145 0xffff8ac79ce0 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #146 0xffff8b186cc0 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) ../libinterp/parse-tree/pt-eval.cc:984
    #147 0xffff8b185a24 in octave::tree_evaluator::repl() ../libinterp/parse-tree/pt-eval.cc:803
    #148 0xffff8ba75a48 in octave::interpreter::main_loop() ../libinterp/corefcn/interpreter.cc:1340
    #149 0xffff8ba68540 in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:908
    #150 0xffff8a22706c in octave::cli_application::execute() ../libinterp/octave.cc:425
    #151 0xaaaadad33b44 in main ../src/main-cli.cc:121
    #152 0xffff87064238 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #153 0xffff87064304 in __libc_start_main_impl ../csu/libc-start.c:409
    #154 0xaaaadad3342c in _start (/home/uu1/src/octave/gcc_asan/src/.libs/octave-cli+0x1342c)

0xffff512fae60 is located 15 bytes to the right of 1-byte region [0xffff512fae50,0xffff512fae51)
allocated by thread T0 here:
    #0 0xffff8c221b7c in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0xffff8a2d9a9c in __gnu_cxx::new_allocator<double>::allocate(unsigned long, void const*) /usr/include/c++/11/ext/new_allocator.h:127
    #2 0xffff8a2d9860 in std::allocator_traits<std::allocator<double> >::allocate(std::allocator<double>&, unsigned long) /usr/include/c++/11/bits/alloc_traits.h:460
    #3 0xffff8a2d97d0 in Array<double, std::allocator<double> >::ArrayRep::allocate(unsigned long) ../liboctave/array/Array.h:197
    #4 0xffff8a2d9b80 in Array<double, std::allocator<double> >::ArrayRep::ArrayRep(double*, long) ../liboctave/array/Array.h:147
    #5 0xffff8a4582b8 in Array<double, std::allocator<double> >::make_unique() ../liboctave/array/Array.h:219
    #6 0xffff8a45521c in Array<double, std::allocator<double> >::elem(long) ../liboctave/array/Array.h:536
    #7 0xffff8a44ca84 in Array<double, std::allocator<double> >::operator()(long) ../liboctave/array/Array.h:548
    #8 0xffff8b63c130 in convert_position ../libinterp/corefcn/graphics.cc:833
    #9 0xffff8b930578 in octave::uicontrol::properties::get_extent() const ../libinterp/corefcn/graphics.cc:11042
    #10 0xffff8b83b480 in octave::uicontrol::properties::get(bool) const libinterp/corefcn/graphics-props.cc:7252
    #11 0xffff8b98054c in octave::base_graphics_object::get(bool) const libinterp/corefcn/graphics.h:2751
    #12 0xffff8b66e4e8 in octave::base_graphics_object::remove_all_listeners() ../libinterp/corefcn/graphics.cc:3758
    #13 0xffff8b9848f4 in octave::graphics_object::remove_all_listeners() libinterp/corefcn/graphics.h:3153
    #14 0xffff8b662b50 in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2917
    #15 0xffff8b651f3c in octave::children_property::do_delete_children(bool, bool) ../libinterp/corefcn/graphics.cc:1903
    #16 0xffff8b97bcc4 in octave::children_property::delete_children(bool, bool) libinterp/corefcn/graphics.h:1781
    #17 0xffff8b97ea90 in octave::base_properties::delete_children(bool, bool) libinterp/corefcn/graphics.h:2351
    #18 0xffff8b662bb4 in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2919
    #19 0xffff8b664770 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3085
    #20 0xffff8b664b70 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3097
    #21 0xffff8b664d8c in delete_graphics_objects ../libinterp/corefcn/graphics.cc:3110
    #22 0xffff8b95f378 in octave::F__go_delete__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/graphics.cc:13663
    #23 0xffff8ad44bd8 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #24 0xffff8ae36c00 in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #25 0xffff8b1ebd3c in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #26 0xffff8b1f13c0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #27 0xffff8b19e3dc in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #28 0xffff8b20a3f8 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #29 0xffff8b19ef00 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866

SUMMARY: AddressSanitizer: heap-buffer-overflow ../libinterp/corefcn/graphics.cc:833 in convert_position
Shadow bytes around the buggy address:
  0x200fea25f570: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f590: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f5a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f5b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x200fea25f5c0: fa fa fa fa fa fa fa fa fa fa 01 fa[fa]fa 00 00
  0x200fea25f5d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f5e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f5f0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f600: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x200fea25f610: 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
  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
  Shadow gap:              cc
==985255==ABORTING


Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 11:36:58 PM UTC, comment #53: 

hest gui/uicontrol.m triggers eap-buffer-overflow.
Perhaps it is real.



octave:1> test gui/uicontrol.m
=================================================================
==866975==ERROR: AddressSanitizer: test uicontrol triggers bu on address 0xc773cb80 at pc 0xf66ae578 bp 0xffcf513c sp 0xffcf512c
WRITE of size 8 at 0xc773cb80 thread T0
    #0 0xf66ae574 in convert_position ../libinterp/corefcn/graphics.cc:833
    #1 0xf69ec72c in octave::uicontrol::properties::get_extent() const ../libinterp/corefcn/graphics.cc:11042
    #2 0xf68ddb10 in octave::uicontrol::properties::get(bool) const libinterp/corefcn/graphics-props.cc:7252


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 10:39:26 PM UTC, comment #52: 

0a1aec50a0c8 (stable) w/ ASAN (continue)

make check

Integrated test scripts:

  liboctave/array/Array.cc-tst ................................... pass   21/21
  liboctave/array/CMatrix.cc-tst ................................. pass   11/11
  liboctave/array/CSparse.cc-tst ................................. pass   10/10
  liboctave/array/Sparse.cc-tst ..................................=================================================================
==869930==ERROR: AddressSanitizer: stack-use-after-scope on address 0xff92bc1c at pc 0xf73696bc bp 0xff92bbf4 sp 0xff92b7c8
WRITE of size 12 at 0xff92bc1c thread T0
    #0 0xf73696b8 in __interceptor_sigaltstack ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986
    #1 0xf73cf548 in __asan::PlatformUnpoisonStacks() ../../../../src/libsanitizer/asan/asan_posix.cpp:44
    #2 0xf73d4a84 in __asan_handle_no_return ../../../../src/libsanitizer/asan/asan_rtl.cpp:612
    #3 0xf5de6cc0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3842
    #4 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #5 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #6 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #7 0xf5de7c94 in octave::tree_evaluator::visit_switch_command(octave::tree_switch_command&) ../libinterp/parse-tree/pt-eval.cc:3943
    #8 0xf5e7636c in octave::tree_switch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:279
    #9 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #10 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #11 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #12 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #13 0xf5de39d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #14 0xf5af8df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #15 0xf5af8c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #16 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #17 0xf5e582e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #18 0xf5de6338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #19 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #20 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #21 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #22 0xf5de39d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #23 0xf5af8df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #24 0xf5af8c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #25 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #26 0xf5dcaf30 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #27 0xf5dcbc80 in octave::tree_evaluator::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1111
    #28 0xf682ec60 in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1502
    #29 0xf5d3d2ac in octave::Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6432
    #30 0xf58a5a30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #31 0xf59c414c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #32 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #33 0xf5e582e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #34 0xf5de6338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #35 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #36 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #37 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #38 0xf5de8108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #39 0xf5e380c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #40 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #41 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #42 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #43 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #44 0xf5de5044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #45 0xf5e03d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #46 0xf5de4aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #47 0xf5e76174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #48 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #49 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #50 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #51 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #52 0xf5de5044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #53 0xf5e03d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #54 0xf5de4aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #55 0xf5e76174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #56 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #57 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #58 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #59 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #60 0xf5de9aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #61 0xf5e381bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #62 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #63 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #64 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #65 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #66 0xf5e082ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #67 0xf5ddf7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #68 0xf5e6341c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #69 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #70 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #71 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #72 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #73 0xf5de39d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #74 0xf5af8df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #75 0xf5af8c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #76 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #77 0xf5d9af08 in octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201
    #78 0xf5d9fbf8 in octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156
    #79 0xf5de6338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #80 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #81 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #82 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #83 0xf5de5044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #84 0xf5e03d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #85 0xf5de4aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #86 0xf5e76174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #87 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #88 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #89 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #90 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #91 0xf5de5044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #92 0xf5e03d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #93 0xf5de4aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #94 0xf5e76174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #95 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #96 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #97 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #98 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #99 0xf5e082ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #100 0xf5ddf7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #101 0xf5e6341c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #102 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #103 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #104 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #105 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #106 0xf5de9aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #107 0xf5e381bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #108 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #109 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #110 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #111 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #112 0xf5de39d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #113 0xf5af8df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #114 0xf5af8c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #115 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #116 0xf5d9af08 in octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201
    #117 0xf5d9fbf8 in octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156
    #118 0xf5de6338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #119 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #120 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #121 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #122 0xf5de5044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #123 0xf5e03d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #124 0xf5de4aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #125 0xf5e76174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #126 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #127 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #128 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #129 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #130 0xf5e082ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #131 0xf5ddf7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #132 0xf5e6341c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #133 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #134 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #135 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #136 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #137 0xf5de39d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #138 0xf5af8df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #139 0xf5af8c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #140 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #141 0xf5d9af08 in octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201
    #142 0xf5d9fbf8 in octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156
    #143 0xf5de6338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #144 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #145 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #146 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #147 0xf5e082ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #148 0xf5ddf7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #149 0xf5e6341c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #150 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #151 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #152 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #153 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #154 0xf5de8108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #155 0xf5e380c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #156 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #157 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #158 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #159 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #160 0xf5de9aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #161 0xf5e381bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #162 0xf5de5f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #163 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #164 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #165 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #166 0xf5de39d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #167 0xf5af8df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #168 0xf5af8c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #169 0xf5e50ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #170 0xf5e582e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #171 0xf5de6338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #172 0xf5e7aa70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #173 0xf5de71ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #174 0xf57af604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #175 0xf5de1d20 in octave::tree_evaluator::execute_user_script(octave_user_script&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3366
    #176 0xf5af3944 in octave_user_script::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:196
    #177 0xf5af37cc in octave_user_script::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:189
    #178 0xf5dd6b58 in octave::tree_evaluator::source_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) ../libinterp/parse-tree/pt-eval.cc:2190
    #179 0xf68307cc in octave::interpreter::source_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) ../libinterp/corefcn/interpreter.cc:1700
    #180 0xf5d3b184 in octave::source_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, bool) ../libinterp/parse-tree/oct-parse.yy:6195
    #181 0xf6818074 in safe_source_file ../libinterp/corefcn/interpreter.cc:351
    #182 0xf682d070 in octave::interpreter::execute_command_line_file() ../libinterp/corefcn/interpreter.cc:1333
    #183 0xf681dea0 in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:868
    #184 0xf4b3b33c in octave::cli_application::execute() ../libinterp/octave.cc:425
    #185 0x702840 in main ../src/main-cli.cc:121
    #186 0xf20b8e20 in __libc_start_main csu/libc-start.c:332

Address 0xff92bc1c is located in stack of thread T0
SUMMARY: AddressSanitizer: stack-use-after-scope ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986 in __interceptor_sigaltstack
Shadow bytes around the buggy address:
  0x3ff25730: f8 00 00 00 00 00 f8 f8 00 00 f8 f8 00 00 00 00
  0x3ff25740: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff25750: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff25760: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff25770: 00 00 00 00 00 00 00 00 00 00 00 00 f8 f8 f8 f8
=>0x3ff25780: f8 f8 f8[f8]00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff25790: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 00
  0x3ff257a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff257b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff257c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff257d0: 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
  Shadow gap:              cc
==869930==ABORTING

But usually it crashes at Array.cc-tst



  liboctave/array/Array.cc-tst ...................................=================================================================
==872730==ERROR: AddressSanitizer: stack-use-after-scope on address 0xffae01b4 at pc 0xf76256bc bp 0xffae018c sp 0xffadfd60
WRITE of size 12 at 0xffae01b4 thread T0
    #0 0xf76256b8 in __interceptor_sigaltstack ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986
    #1 0xf768b548 in __asan::PlatformUnpoisonStacks() ../../../../src/libsanitizer/asan/asan_posix.cpp:44
    #2 0xf7690a84 in __asan_handle_no_return ../../../../src/libsanitizer/asan/asan_rtl.cpp:612
    #3 0xf60a2cc0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3842
    #4 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #5 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #6 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #7 0xf609f9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #8 0xf5db4df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #9 0xf5db4c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #10 0xf610cec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #11 0xf6086f30 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #12 0xf6087c80 in octave::tree_evaluator::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1111
    #13 0xf6aeac60 in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1502
    #14 0xf5ff92ac in octave::Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6432
    #15 0xf5b61a30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #16 0xf5c8014c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #17 0xf610cec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #18 0xf61142e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #19 0xf60a2338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #20 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #21 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #22 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #23 0xf60a4108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #24 0xf60f40c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #25 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #26 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #27 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #28 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #29 0xf60a1044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #30 0xf60bfd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #31 0xf60a0aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #32 0xf6132174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #33 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #34 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #35 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #36 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #37 0xf60a1044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #38 0xf60bfd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #39 0xf60a0aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #40 0xf6132174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #41 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #42 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #43 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #44 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #45 0xf60a5aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #46 0xf60f41bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #47 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #48 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #49 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #50 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #51 0xf60c42ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #52 0xf609b7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #53 0xf611f41c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #54 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #55 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #56 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #57 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #58 0xf609f9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #59 0xf5db4df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #60 0xf5db4c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #61 0xf610cec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #62 0xf6056f08 in octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201
    #63 0xf605bbf8 in octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156
    #64 0xf60a2338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #65 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #66 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #67 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #68 0xf60a1044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #69 0xf60bfd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #70 0xf60a0aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #71 0xf6132174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #72 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #73 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #74 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #75 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #76 0xf60a1044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #77 0xf60bfd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #78 0xf60a0aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #79 0xf6132174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #80 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #81 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #82 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #83 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #84 0xf60c42ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #85 0xf609b7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #86 0xf611f41c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #87 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #88 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #89 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #90 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #91 0xf60a5aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #92 0xf60f41bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #93 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #94 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #95 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #96 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #97 0xf609f9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #98 0xf5db4df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #99 0xf5db4c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #100 0xf610cec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #101 0xf6056f08 in octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201
    #102 0xf605bbf8 in octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156
    #103 0xf60a2338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #104 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #105 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #106 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #107 0xf60a1044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #108 0xf60bfd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #109 0xf60a0aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #110 0xf6132174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #111 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #112 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #113 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #114 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #115 0xf60c42ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #116 0xf609b7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #117 0xf611f41c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #118 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #119 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #120 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #121 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #122 0xf609f9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #123 0xf5db4df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #124 0xf5db4c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #125 0xf610cec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #126 0xf6056f08 in octave::tree_multi_assignment::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.cc:201
    #127 0xf605bbf8 in octave::tree_multi_assignment::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-assign.h:156
    #128 0xf60a2338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #129 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #130 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #131 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #132 0xf60c42ac in void octave::tree_evaluator::execute_range_loop<double>(octave::range<double, void> const&, int, octave::octave_lvalue&, octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:3048
    #133 0xf609b7d0 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3095
    #134 0xf611f41c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #135 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #136 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #137 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #138 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #139 0xf60a4108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #140 0xf60f40c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #141 0xf60a1f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #142 0xf6136a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #143 0xf60a31ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #144 0xf5a6b604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #145 0xf60a5aa8 in octave::tree_evaluator::visit_unwind_protect_c

Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 10:37:43 PM UTC, comment #51: 

Octave just uses C++ exception handling.  I don't think that counts as a custom stack unwind mechanism.

As far as I know, the way we call sigemptyset in octave_set_signal_handler_internal is OK.

John W. Eaton <jwe>
Group administrator
Sun 03 Apr 2022 10:25:42 PM UTC, comment #50: 

What does this mean for ASAN with Octave:

HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork

Octave does use a custom stack unwinding mechanism after all, so are these false positives?

Arun Giridhar <arungiridhar>
Group Member
Sun 03 Apr 2022 10:18:27 PM UTC, comment #49: 

0a1aec50a0c8 (stable) w/ ASAN.
Start octave and exit:


octave:1>

=================================================================
==866659==ERROR: AddressSanitizer: stack-use-after-scope on address 0xffa126d0 at pc 0xf767c8d8 bp 0xffa1261c sp 0xffa121f0
WRITE of size 128 at 0xffa126d0 thread T0
    #0 0xf767c8d4 in __interceptor_sigemptyset ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4076
    #1 0xf44653a0 in octave_set_signal_handler_internal ../liboctave/wrappers/signal-wrappers.c:378
    #2 0xf44655c4 in octave_set_signal_handler_by_name ../liboctave/wrappers/signal-wrappers.c:394
    #3 0xf6f10a3c in octave::set_signal_handler(char const*, void (*)(int), bool) ../libinterp/corefcn/sighandlers.cc:269
    #4 0xf6f10ff0 in octave::catch_interrupts() ../libinterp/corefcn/sighandlers.cc:331
    #5 0xf6b3fa4c in octave::interpreter::recover_from_exception() ../libinterp/corefcn/interpreter.cc:1945
    #6 0xf6b34d04 in octave::interpreter::shutdown() ../libinterp/corefcn/interpreter.cc:1034
    #7 0xf6b2c02c in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:916
    #8 0xf4e4933c in octave::cli_application::execute() ../libinterp/octave.cc:425
    #9 0x4f2840 in main ../src/main-cli.cc:121
    #10 0xf23c6e20 in __libc_start_main csu/libc-start.c:332

Address 0xffa126d0 is located in stack of thread T0 at offset 144 in frame
    #0 0xf4465184 in octave_set_signal_handler_internal ../liboctave/wrappers/signal-wrappers.c:355

  This frame has 2 object(s):
    [32, 172) 'act' (line 356) <== Memory access at offset 144 partially overflows this variable
    [240, 380) 'oact' (line 356) <== Memory access at offset 144 partially underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-use-after-scope ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4076 in __interceptor_sigemptyset
Shadow bytes around the buggy address:
  0x3ff42480: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff42490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff424a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff424b0: 00 00 00 00 00 00 00 00 00 00 f8 f8 f8 00 00 00
  0x3ff424c0: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00
=>0x3ff424d0: 00 00 00 00 00 00 00 00 00 00[f8]f8 00 04 f2 f2
  0x3ff424e0: f2 f2 f2 f2 f2 f2 00 00 f8 f8 f8 f8 f8 f8 f8 f8
  0x3ff424f0: 00 00 00 00 00 00 00 04 f3 f3 f3 f3 f3 f3 f3 f3
  0x3ff42500: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f3 f3 f3
  0x3ff42510: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff42520: f1 f1 f1 f1 00 f3 f3 f3 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
  Shadow gap:              cc
==866659==ABORTING


test uicontrol


octave:1> test gui/uicontrol.m
=================================================================
==866975==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xc773cb80 at pc 0xf66ae578 bp 0xffcf513c sp 0xffcf512c
WRITE of size 8 at 0xc773cb80 thread T0
    #0 0xf66ae574 in convert_position ../libinterp/corefcn/graphics.cc:833
    #1 0xf69ec72c in octave::uicontrol::properties::get_extent() const ../libinterp/corefcn/graphics.cc:11042
    #2 0xf68ddb10 in octave::uicontrol::properties::get(bool) const libinterp/corefcn/graphics-props.cc:7252
    #3 0xf6a460cc in octave::base_graphics_object::get(bool) const libinterp/corefcn/graphics.h:2751
    #4 0xf66e5d24 in octave::base_graphics_object::remove_all_listeners() ../libinterp/corefcn/graphics.cc:3758
    #5 0xf6a4c280 in octave::graphics_object::remove_all_listeners() libinterp/corefcn/graphics.h:3153
    #6 0xf66d9290 in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2917
    #7 0xf66c68bc in octave::children_property::do_delete_children(bool, bool) ../libinterp/corefcn/graphics.cc:1903
    #8 0xf6a4037c in octave::children_property::delete_children(bool, bool) libinterp/corefcn/graphics.h:1781
    #9 0xf6a43de0 in octave::base_properties::delete_children(bool, bool) libinterp/corefcn/graphics.h:2351
    #10 0xf66d935c in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2919
    #11 0xf66db230 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3085
    #12 0xf66db648 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3097
    #13 0xf66db854 in delete_graphics_objects ../libinterp/corefcn/graphics.cc:3110
    #14 0xf6a1f7e0 in octave::F__go_delete__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/graphics.cc:13663
    #15 0xf5be3a30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #16 0xf5d0214c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #17 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #18 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #19 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #20 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #21 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #22 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #23 0xf6123044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #24 0xf6141d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #25 0xf6122aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #26 0xf61b4174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #27 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #28 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #29 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #30 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #31 0xf61219d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #32 0xf5e36df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #33 0xf5e36c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #34 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #35 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #36 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #37 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #38 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #39 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #40 0xf6123044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #41 0xf6141d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #42 0xf6122aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #43 0xf61b4174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #44 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #45 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #46 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #47 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #48 0xf61219d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #49 0xf5e36df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #50 0xf5e36c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #51 0xf6186970 in octave::tree_identifier::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-id.cc:130
    #52 0xf6108f30 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #53 0xf6b6c9bc in octave::interpreter::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/corefcn/interpreter.cc:1483
    #54 0xf6a0a6fc in octave::gh_manager::execute_callback(octave_handle const&, octave_value const&, octave_value const&) ../libinterp/corefcn/graphics.cc:12332
    #55 0xf6aab71c in octave::gh_manager::execute_callback(octave_handle const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, octave_value const&) (/usr/local/src/octave/gcc_asan/libinterp/.libs/liboctinterp.so.10+0x22c371c)
    #56 0xf6a206f4 in octave::F__go_execute_callback__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/graphics.cc:13732
    #57 0xf5be3a30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #58 0xf5d0214c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #59 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #60 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #61 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #62 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #63 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #64 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #65 0xf611d920 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3166
    #66 0xf61a141c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #67 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #68 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #69 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #70 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #71 0xf61219d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #72 0xf5e36df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #73 0xf5e36c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #74 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #75 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #76 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #77 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #78 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #79 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #80 0xf6127408 in octave::tree_evaluator::do_unwind_protect_cleanup_code(octave::tree_statement_list*) ../libinterp/parse-tree/pt-eval.cc:4054
    #81 0xf6127ab4 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4157
    #82 0xf61761bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #83 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #84 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #85 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #86 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #87 0xf61219d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #88 0xf5e36df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #89 0xf5e36c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #90 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #91 0xf6108f30 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #92 0xf6109c80 in octave::tree_evaluator::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1111
    #93 0xf6b6cc60 in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1502
    #94 0xf607b2ac in octave::Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6432
    #95 0xf5be3a30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #96 0xf5d0214c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #97 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #98 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #99 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #100 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #101 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #102 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #103 0xf6126108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #104 0xf61760c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #105 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #106 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #107 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #108 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #109 0xf6123044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #110 0xf6141d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #111 0xf6122aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #112 0xf61b4174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #113 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #114 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #115 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #116 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #117 0xf6123044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #118 0xf6141d1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #119 0xf6122aac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #120 0xf61b4174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #121 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #122 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #123 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #124 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #125 0xf6127aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #126 0xf61761bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #127 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #128 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #129 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #130 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #131 0xf611d920 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3166
    #132 0xf61a141c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #133 0xf6123f98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #134 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #135 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #136 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #137 0xf61219d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #138 0xf5e36df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #139 0xf5e36c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #140 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #141 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #142 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #143 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #144 0xf61251ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #145 0xf5aed604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #146 0xf6108694 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) ../libinterp/parse-tree/pt-eval.cc:984
    #147 0xf6106de4 in octave::tree_evaluator::repl() ../libinterp/parse-tree/pt-eval.cc:803
    #148 0xf6b6b34c in octave::interpreter::main_loop() ../libinterp/corefcn/interpreter.cc:1340
    #149 0xf6b5bfdc in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:908
    #150 0xf4e7933c in octave::cli_application::execute() ../libinterp/octave.cc:425
    #151 0x7d2840 in main ../src/main-cli.cc:121
    #152 0xf23f6e20 in __libc_start_main csu/libc-start.c:332

0xc773cb80 is located 15 bytes to the right of 1-byte region [0xc773cb70,0xc773cb71)
allocated by thread T0 here:
    #0 0xf7709460 in operator new(unsigned int) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:99
    #1 0xf4f5b324 in __gnu_cxx::new_allocator<double>::allocate(unsigned int, void const*) /usr/include/c++/11/ext/new_allocator.h:127
    #2 0xf4f5b0d0 in std::allocator_traits<std::allocator<double> >::allocate(std::allocator<double>&, unsigned int) /usr/include/c++/11/bits/alloc_traits.h:464
    #3 0xf4f5b028 in Array<double, std::allocator<double> >::ArrayRep::allocate(unsigned int) ../liboctave/array/Array.h:197
    #4 0xf4f5b434 in Array<double, std::allocator<double> >::ArrayRep::ArrayRep(double*, int) ../liboctave/array/Array.h:147
    #5 0xf5134160 in Array<double, std::allocator<double> >::make_unique() ../liboctave/array/Array.h:219
    #6 0xf512f260 in Array<double, std::allocator<double> >::elem(int) ../liboctave/array/Array.h:536
    #7 0xf51240b4 in Array<double, std::allocator<double> >::operator()(int) ../liboctave/array/Array.h:548
    #8 0xf66ae550 in convert_position ../libinterp/corefcn/graphics.cc:833
    #9 0xf69ec72c in octave::uicontrol::properties::get_extent() const ../libinterp/corefcn/graphics.cc:11042
    #10 0xf68ddb10 in octave::uicontrol::properties::get(bool) const libinterp/corefcn/graphics-props.cc:7252
    #11 0xf6a460cc in octave::base_graphics_object::get(bool) const libinterp/corefcn/graphics.h:2751
    #12 0xf66e5d24 in octave::base_graphics_object::remove_all_listeners() ../libinterp/corefcn/graphics.cc:3758
    #13 0xf6a4c280 in octave::graphics_object::remove_all_listeners() libinterp/corefcn/graphics.h:3153
    #14 0xf66d9290 in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2917
    #15 0xf66c68bc in octave::children_property::do_delete_children(bool, bool) ../libinterp/corefcn/graphics.cc:1903
    #16 0xf6a4037c in octave::children_property::delete_children(bool, bool) libinterp/corefcn/graphics.h:1781
    #17 0xf6a43de0 in octave::base_properties::delete_children(bool, bool) libinterp/corefcn/graphics.h:2351
    #18 0xf66d935c in octave::gh_manager::free(octave_handle const&, bool) ../libinterp/corefcn/graphics.cc:2919
    #19 0xf66db230 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3085
    #20 0xf66db648 in delete_graphics_object ../libinterp/corefcn/graphics.cc:3097
    #21 0xf66db854 in delete_graphics_objects ../libinterp/corefcn/graphics.cc:3110
    #22 0xf6a1f7e0 in octave::F__go_delete__(octave::interpreter&, octave_value_list const&, int) ../libinterp/corefcn/graphics.cc:13663
    #23 0xf5be3a30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #24 0xf5d0214c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #25 0xf618eec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #26 0xf61962e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #27 0xf6124338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #28 0xf61b8a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124

SUMMARY: AddressSanitizer: heap-buffer-overflow ../libinterp/corefcn/graphics.cc:833 in convert_position
Shadow bytes around the buggy address:
  0x38ee7920: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x38ee7930: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x38ee7940: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x38ee7950: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x38ee7960: fa fa fa fa fa fa fa fa fa fa fa fa fa fa 01 fa
=>0x38ee7970:[fa]fa 00 04 fa fa 00 fa fa fa fd fa fa fa fd fd
  0x38ee7980: fa fa fd fa fa fa fd fa fa fa 00 fa fa fa fd fa
  0x38ee7990: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
  0x38ee79a0: fa fa fd fd fa fa fd fd fa fa 00 04 fa fa 00 fa
  0x38ee79b0: fa fa fd fa fa fa fd fd fa fa fd fa fa fa fd fa
  0x38ee79c0: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd 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
  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
  Shadow gap:              cc
==866975==ABORTING


test bug-35881


octave:1> cd ../test/bug-35881
octave:2> test bug-35881.tst
=================================================================
==867134==ERROR: AddressSanitizer: stack-use-after-scope on address 0xffd69914 at pc 0xf72b26bc bp 0xffd698ec sp 0xffd694c0
WRITE of size 12 at 0xffd69914 thread T0
    #0 0xf72b26b8 in __interceptor_sigaltstack ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986
    #1 0xf7318548 in __asan::PlatformUnpoisonStacks() ../../../../src/libsanitizer/asan/asan_posix.cpp:44
    #2 0xf731da84 in __asan_handle_no_return ../../../../src/libsanitizer/asan/asan_rtl.cpp:612
    #3 0xf5d2fcc0 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3842
    #4 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #5 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #6 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #7 0xf5d2c9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #8 0xf5a41df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #9 0xf5a41c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #10 0xf5d99ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #11 0xf5d13f30 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #12 0xf5d15dac in octave::tree_evaluator::evalin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1179
    #13 0xf6777e50 in octave::interpreter::evalin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1516
    #14 0xf5c86f24 in octave::Fevalin(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6553
    #15 0xf57eea30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #16 0xf590d14c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #17 0xf5d99ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #18 0xf5da12e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #19 0xf5d2f338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #20 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #21 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #22 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #23 0xf5d31108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #24 0xf5d810c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #25 0xf5d2ef98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #26 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #27 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #28 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #29 0xf5d2e044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #30 0xf5d4cd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #31 0xf5d2daac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #32 0xf5dbf174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #33 0xf5d2ef98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #34 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #35 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #36 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #37 0xf5d2c9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #38 0xf5a41df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #39 0xf5a41c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #40 0xf5d99ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #41 0xf5da12e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #42 0xf5d2f338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #43 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #44 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #45 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #46 0xf5d2c9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #47 0xf5a41df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #48 0xf5a41c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #49 0xf5d99ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #50 0xf5d13f30 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #51 0xf5d14c80 in octave::tree_evaluator::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1111
    #52 0xf6777c60 in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1502
    #53 0xf5c862ac in octave::Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6432
    #54 0xf57eea30 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #55 0xf590d14c in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #56 0xf5d99ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #57 0xf5da12e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #58 0xf5d2f338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #59 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #60 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #61 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #62 0xf5d31108 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #63 0xf5d810c0 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #64 0xf5d2ef98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #65 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #66 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #67 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #68 0xf5d2e044 in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #69 0xf5d4cd1c in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #70 0xf5d2daac in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #71 0xf5dbf174 in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #72 0xf5d2ef98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #73 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #74 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #75 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #76 0xf5d32aa8 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #77 0xf5d811bc in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #78 0xf5d2ef98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #79 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #80 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #81 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #82 0xf5d28920 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3166
    #83 0xf5dac41c in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #84 0xf5d2ef98 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #85 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #86 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #87 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #88 0xf5d2c9d0 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #89 0xf5a41df4 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #90 0xf5a41c64 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #91 0xf5d99ec4 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #92 0xf5da12e8 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #93 0xf5d2f338 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #94 0xf5dc3a70 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #95 0xf5d301ac in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #96 0xf56f8604 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #97 0xf5d13694 in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) ../libinterp/parse-tree/pt-eval.cc:984
    #98 0xf5d11de4 in octave::tree_evaluator::repl() ../libinterp/parse-tree/pt-eval.cc:803
    #99 0xf677634c in octave::interpreter::main_loop() ../libinterp/corefcn/interpreter.cc:1340
    #100 0xf6766fdc in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:908
    #101 0xf4a8433c in octave::cli_application::execute() ../libinterp/octave.cc:425
    #102 0x492840 in main ../src/main-cli.cc:121
    #103 0xf2001e20 in __libc_start_main csu/libc-start.c:332

Address 0xffd69914 is located in stack of thread T0
SUMMARY: AddressSanitizer: stack-use-after-scope ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986 in __interceptor_sigaltstack
Shadow bytes around the buggy address:
  0x3ffad2d0: f8 00 00 00 00 00 f8 f8 00 00 f8 f8 00 00 00 00
  0x3ffad2e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad2f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad310: 00 00 00 00 00 00 00 00 00 00 00 00 f8 f8 f8 f8
=>0x3ffad320: f8 f8[f8]f8 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad330: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 00
  0x3ffad340: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad350: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ffad370: 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
  Shadow gap:              cc
==867134==ABORTING


Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 06:53:30 PM UTC, comment #48: 

OK, so if I comment out uicontrol test, "make check" passes
the rest (including bug-35881.tst).


test/sparse.tst ................................................ pass 1202/1202
                                                 (missing feature) SKIP    2
  bug-35448/bug-35448.tst ........................................ pass    2/2
  bug-35881/bug-35881.tst ........................................ pass    1/1
  bug-36025/bug-36025.tst ........................................ pass    1/1

<...>

Summary:

  PASS                            17059
  FAIL                                7
  REGRESSION                          1
  XFAIL (reported bug)               28
  SKIP (missing feature)            105
  SKIP (run-time condition)          52

<...>
  HG ID for this build is "0a1aec50a0c8+"


Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 06:48:17 PM UTC, comment #47: 

I built with ASAN. I was getting stack-use-after-scope pretty much
at the very first test (Array.cc) intermittently and when it passed this it would get it at Sparse.cc etc...

When building docs the crash was not ASAN related directly (I posted about it in different bug report #61911). But again I can skip it, but all of these makes me think ASAN is not very reliable on this platform.

At the moment I commented out uicontrol test and re-run the test
to see if it goes further.

This computer is not very fast, and my chroot environment is not optimized either.

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 06:37:28 PM UTC, comment #46: 

Is that with the latest stable branch and no patches?  What about with the last patch that I posted applied to the stable branch?

Either way, could you also try building with the address sanitizer enabled?  If you use --disable-java --disable-docs then I expect the build to succeed and maybe then the tests will run and point to a problem that isn't obvious from the location of the eventual segfault.

John W. Eaton <jwe>
Group administrator
Sun 03 Apr 2022 06:24:43 PM UTC, comment #45: 

Now it crashes at uicontrol:


 gui/setappdata.m ............................................... pass   11/11
  gui/uicontrol.m ................................................fatal: caught signal Segmentation fault -- stopping myself...
/bin/bash: line 1: 753878 Segmentation fault      (core dumped) ( /bin/bash ../run-octave --no-init-file --silent --no-history -p /usr/local/src/octave/gcc_def/test/mex /usr/local/src/octave/gcc_def/../test/fntests.m /usr/local/src/octave/gcc_def/../test )
make[4]: *** [Makefile:2848: check-local] Error 139
m


Again, the individual test passes, but then octave core dumps
at exit:



octave:1> test gui/uicontrol.m
PASSES 1 out of 1 test
octave:2> quit
fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)


No crash under gdb:



octave:1> test gui/uicontrol.m
[Detaching after fork from child process 756152]
PASSES 1 out of 1 test
octave:2> quit
error: ignoring const execution_exception& while preparing to exit
[Thread 0xf0d9e380 (LWP 756151) exited]
[Inferior 1 (process 756125) exited normally]
(gdb)


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 04:10:26 PM UTC, comment #44: 

OK. I just re-cloned it. It will take a while to finish rebuilding...

Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 03:50:18 PM UTC, comment #43: 

Hmm, so that function doesn't do anything that could obviously cause trouble.  But, moving on, try the attached change?

But separately, by running the test suite with the address sanitizer, I found and fixed a possible buffer overflow issue here:

http://hg.savannah.gnu.org/hgweb/octave/rev/0a1aec50a0c8

So could you also please update to the latest revision on the stable branch and try that without any patches?

(file #53039)

John W. Eaton <jwe>
Group administrator
Sun 03 Apr 2022 01:08:14 PM UTC, comment #42: 

"make check" passes with no-current-frame patch.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sun 03 Apr 2022 10:59:07 AM UTC, comment #41: 

Could you test the attached change?  Again, with only this change, not any of the previous ones.

When I try to use ASAN, I have usually configured with --disable-docs --disable-java.

(file #53038)

John W. Eaton <jwe>
Group administrator
Sat 02 Apr 2022 10:00:01 PM UTC, comment #40: 

Test that crashed in comments #16 now passes.

But I cannot run "make check" with ASAN -- it crashes with
stack-use-after-scope which I cannot suppress.

It also crashes building docs. So I do not have too much
faith in it.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 02 Apr 2022 08:12:12 PM UTC, comment #39: 

"make check" passes with omit-backtrace-frames.

As I mentioned in comment 27, the crash is the same with
gcc (gcc version 11.2.0 (Debian 11.2.0-19)) or clang
(Debian clang version 13.0.1-3+b2).

I will do ASAN with the same  patch.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 02 Apr 2022 06:08:38 PM UTC, comment #38: 

@Dmitri: if your ARM machine allows for it, could you build with "-fsanitize=address,undefined" and see what messages it gives during "make check"?

Also, can you confirm that there is no compiler dependence? That is, the unpatched version crashes on "make check" with both GCC and Clang, and the patched version does not crash with either compiler -- is this correct?

Arun Giridhar <arungiridhar>
Group Member
Sat 02 Apr 2022 06:03:56 PM UTC, comment #37: 

I don't see anything obvious, so the only thing I can think of is to eliminate bits of code until we find the exact point that causes trouble.  Could you try the attached change?  Again, it should be applied separately without any of the other changes I've posted previously.

(file #53035)

John W. Eaton <jwe>
Group administrator
Sat 02 Apr 2022 04:22:11 PM UTC, comment #36: 

Thanks, I'll see if I can understand what might be wrong with generating the stack info and whether there is a better way to do that.

RE comment #34, yes, I'm sure there are a lot more symbols to clear when this test is executed near the end of the test suite.  But I don't understand how that would cause a crash later when trying to access a cleared variable in the test function when that works as expected when the test is executed in a fresh Octave session.

John W. Eaton <jwe>
Group administrator
Sat 02 Apr 2022 04:16:19 PM UTC, comment #35: 

With omit-stack-trace "make check" passes.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 02 Apr 2022 03:52:06 PM UTC, comment #34: 

It must be some kind of a clue that the individual test passes, but make check crashes.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 02 Apr 2022 03:30:20 PM UTC, comment #33: 

Can we determine whether the crash is happening when the new exception is thrown from that location or whether it is crashing when accessing the original execution_exception object in the catch block (or while making the copy)?

If the problem occurs when accessing the original execution_exception object in the catch block, then why would that be wrong?  As far as I can tell, we throw the exception by value and catch it by const reference.  Shouldn't the execution_exception object be valid at this point?

If the execution_exception object is being corrupted by some other mistake in the code, where is that happening?  I suppose it could happen because of a destructor that is called when unwinding the stack between the point where the exception is thrown and the catch block where the crash happens.  But what could be doing that?  I think all the info in the execution_exception object stored by copying (though possibly reference counted).

Maybe try the attached change that simplifies execution_exception object to not store the stack frame info?  This change should be applied without any of the others applied.  If this change avoids the crash, then my guess is that somehow we are accessing the call stack when we shouldn't?

(file #53034)

John W. Eaton <jwe>
Group administrator
Sat 02 Apr 2022 01:51:58 PM UTC, comment #32: 

With exe-except-copy patch it crashed the usual way:


 test/sparse.tst ................................................ pass 1202/1202
                                                 (missing feature) SKIP    2
  bug-35448/bug-35448.tst ........................................ pass    2/2
  bug-35881/bug-35881.tst ........................................fatal: caught signal Segmentation fault -- stopping myself...
/bin/bash: line 1: 350958 Segmentation fault      (core dumped) ( /bin/bash ../run-octave --no-init-file --silent --no-history -p /usr/local/src/octave/gcc_def/test/mex /usr/local/src/octave/gcc_def/../test/fntests.m /usr/local/src/octave/gcc_def/../test )


Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Sat 02 Apr 2022 01:50:08 PM UTC, comment #31: 

Nice to see this is making some progress. I'm following this although I probably cannot be of much help. (I don't have access to ARM or ARM64 hardware.)

Just wondering: Would it also help to rethrow the captured exception with `std::rethrow_exception` instead of throwing a new one or making an explicit copy.
IIUC, that function would make a copy if needed:
https://en.cppreference.com/w/cpp/error/rethrow_exception

Markus Mützel <mmuetzel>
Group administrator
Sat 02 Apr 2022 01:14:04 PM UTC, comment #30: 

Does it work if we force a copy of the exception instead of generating a completely new one (see the attached change)?



(file #53033)

John W. Eaton <jwe>
Group administrator
Fri 01 Apr 2022 11:13:03 PM UTC, comment #29: 

Yes. 2ec4bc7593cc+ is jwe patch (replacing throw with an error message) applied.

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 01 Apr 2022 11:04:57 PM UTC, comment #28: 

@Dmitri, what is the difference between 2ec4bc7593cc and your 2ec4bc7593cc+? Is it only the single patch from jwe in comment #25 or were there compiler differences too?

Arun Giridhar <arungiridhar>
Group Member
Fri 01 Apr 2022 10:24:01 PM UTC, comment #27: 

BTW, i get the same crash if compiled 2ec4bc7593cc (stable)
with clang


clang -v
Debian clang version 13.0.1-3+b2
Target: arm-unknown-linux-gnueabi
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabi/11
Selected GCC installation: /usr/bin/../lib/gcc/arm-linux-gnueabi/11
Candidate multilib: .;@m32
Selected multilib: .;@m32


(but it uses the same libstdc++ )

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Fri 01 Apr 2022 07:51:58 PM UTC, comment #26: 

"make check" goes through:


Summary:

  PASS                            13738
  FAIL                             3322
  REGRESSION                          5
  XFAIL (reported bug)               31
  SKIP (missing feature)            105
  SKIP (run-time condition)          52

<...>
  HG ID for this build is "2ec4bc7593cc+"


and


<...>
test/sparse.tst ................................................ pass 1202/1202
                                                 (missing feature) SKIP    2
  bug-35448/bug-35448.tst ........................................ pass    2/2
  bug-35881/bug-35881.tst ........................................ pass    0/1
                                                              REGRESSION   1
  bug-36025/bug-36025.tst ........................................ pass    1/1

<...>



file src/.libs/octave-cli
src/.libs/octave-cli: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=3e15326d6921080b2d753123ffa4a0c9a2e6e04a, for GNU/Linux 3.2.0, with debug_info, not stripped


Dmitri.
--


Dmitri A. Sergatskov <dasergatskov>
Fri 01 Apr 2022 11:19:13 AM UTC, comment #25: 

Could you please try the attached small change?  There will be many test failures because expected error messages will not match "foobar", but the test suite should run.

By generating a new exception instead of rethrowing the existing one, I'm trying to determine whether the crash (see comment #17) is maybe happening because of some error we are making with the execution_exception class or whether it might be a platform-specific compiler issue.  I don't really see any reason for the segfault.

(file #53027)

John W. Eaton <jwe>
Group administrator
Sat 26 Mar 2022 09:12:02 PM UTC, comment #24: 

If I comment out the switch statement:



cat ../test/bug-35881/bug35881.m

<...>

  _tstvar_.a1 = a;
  ##ML:fprintf ('a=%d\n', a);

##  switch (flag)
##    case 0
##      clear subf;
##    case 1
##      clear functions;
##    case 2
##      clear all;
##  endswitch

  _tstvar_.init2 = subf ();
  _tstvar_.a2 = a;
<...>


"make check" goes through:


Summary:

  PASS                            17059
  FAIL                                7
  REGRESSION                          2
  XFAIL (reported bug)               28
  SKIP (missing feature)            105
  SKIP (run-time condition)          52


I will post details of failures on <https://savannah.gnu.org/bugs/?61911>

Dmitri.
--



Dmitri A. Sergatskov <dasergatskov>
Sat 26 Mar 2022 08:35:25 PM UTC, comment #23: 

Oops it is still crashes with def compiles if I run "make check"
(rather than an individual test).

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 26 Mar 2022 08:12:11 PM UTC, comment #22: 

If I apply the patch then it passes the test (both ASAN and def compiles).

Dmitri A. Sergatskov <dasergatskov>
Sat 26 Mar 2022 07:43:34 PM UTC, comment #21: 

Does it still crash if you make the following change to test/bug-35881/bug35881.m?


diff --git a/test/bug-35881/bug35881.m b/test/bug-35881/bug35881.m
--- a/test/bug-35881/bug35881.m
+++ b/test/bug-35881/bug35881.m
@@ -16,7 +16,7 @@ function bug35881 (flag = 0)
     case 1
       clear functions;
     case 2
-      clear all;
+      ## clear all;
   endswitch

   _tstvar_.init2 = subf ();


If it does still crash after removing that "clear all", what if you remove that whole switch statement?


John W. Eaton <jwe>
Group administrator
Sat 26 Mar 2022 07:01:17 PM UTC, comment #20: 

But it crashes when I do "make check":



Fixed test scripts:

  test/bc-overloads.tst .......................................... pass  451/451
  test/conv.tst .................................................. pass  405/405
  test/sparse.tst ................................................ pass 1202/1202
                                                 (missing feature) SKIP    2
  bug-35448/bug-35448.tst ........................................ pass    2/2
  bug-35881/bug-35881.tst ........................................fatal: caught signal Segmentation fault -- stopping myself...
/bin/bash: line 1: 522603 Segmentation fault      (core dumped) ( /bin/bash ../run-octave --no-init-file --silent --no-history -p /usr/local/src/octave/gcc_def/test/m


Dmitri A. Sergatskov <dasergatskov>
Sat 26 Mar 2022 05:36:02 PM UTC, comment #19: 

With the default flags (no ASAN) it compiles w/o problem
and test passes:


octave:1> cd ../test/bug-35881
octave:2>  test bug-35881.tst
PASSES 1 out of 1 test
octave:3> ver
----------------------------------------------------------------------
GNU Octave Version: 7.0.93 (hg id: 5fa3d8f0dcb3)
GNU Octave License: GNU General Public License
Operating System: Linux 5.13.0-1022-raspi #24-Ubuntu SMP PREEMPT Wed Mar 16 07:19:33 UTC 2022 aarch64
----------------------------------------------------------------------

file src/.libs/octave-cli
src/.libs/octave-cli: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, BuildID[sha1]=0ae5d5dc549fa865e057d8fd704b9b69eef97471, for GNU/Linux 3.2.0, with debug_info, not stripped


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 26 Mar 2022 08:38:22 AM UTC, comment #18: 

Yes this is hg id 5fa3d8f0dcb3 (stable)


gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/11/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 11.2.0-19' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=arm-linux-gnueabi- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions --with-arch=armv5te --with-float=soft --disable-werror --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Debian 11.2.0-19)


Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Sat 26 Mar 2022 04:11:36 AM UTC, comment #17: 

What is pt-eval.cc:3842?  In the current stable branch, that is the throw marked with "<<==" at the end of the following code block in tree_evaluator::visit_statement:


        catch (const execution_exception& ee)
          {
            error_system& es = m_interpreter.get_error_system ();

            if ((m_interpreter.interactive ()
                 || application::forced_interactive ())
                && ((es.debug_on_error ()
                     && m_bp_table.debug_on_err (es.last_error_id ()))
                    || (es.debug_on_caught ()
                        && m_bp_table.debug_on_caught (es.last_error_id ())))
                && in_user_code ())
              {
                es.save_exception (ee);
                es.display_exception (ee);

                enter_debugger ();

                // It doesn't make sense to continue execution after an
                // error occurs so force the debugger to quit all debug
                // levels and return the the top prompt.

                throw quit_debug_exception (true);
              }
            else
              throw;   <<==
          }


If it is the same in the version of Octave that you are compiling when you see this error, then is there something wrong about the use of "throw" in this context?  How does that cause the "stack-use-after-scope" ASAN error?

What compiler version are you using?  Is the result the same if you use a different compiler version?

John W. Eaton <jwe>
Group administrator
Sat 26 Mar 2022 03:35:03 AM UTC, comment #16: 

This is what I see (compiled with debug and ASAN flags) on
Debian armel chroot:


octave:3> cd ../test/bug-35881
octave:4> test bug-35881.tst
=================================================================
==400363==ERROR: AddressSanitizer: stack-use-after-scope on address 0xff9ce494 at pc 0xf79406bc bp 0xff9ce46c sp 0xff9ce040
WRITE of size 12 at 0xff9ce494 thread T0
    #0 0xf79406b8 in __interceptor_sigaltstack ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986
    #1 0xf79a6548 in __asan::PlatformUnpoisonStacks() ../../../../src/libsanitizer/asan/asan_posix.cpp:44
    #2 0xf79aba84 in __asan_handle_no_return ../../../../src/libsanitizer/asan/asan_rtl.cpp:612
    #3 0xf63becb8 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3842
    #4 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #5 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #6 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #7 0xf63bb9c8 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #8 0xf60d0c74 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #9 0xf60d0ae4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #10 0xf6428ebc in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #11 0xf63a2f28 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #12 0xf63a4da4 in octave::tree_evaluator::evalin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1179
    #13 0xf6e06e40 in octave::interpreter::evalin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1516
    #14 0xf6315f1c in octave::Fevalin(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6553
    #15 0xf5e7d8b0 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #16 0xf5f9bfcc in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #17 0xf6428ebc in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #18 0xf64302e0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #19 0xf63be330 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #20 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #21 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #22 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #23 0xf63c0100 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #24 0xf64100b8 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #25 0xf63bdf90 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #26 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #27 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #28 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #29 0xf63bd03c in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #30 0xf63dbd14 in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #31 0xf63bcaa4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #32 0xf644e16c in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #33 0xf63bdf90 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #34 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #35 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #36 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #37 0xf63bb9c8 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #38 0xf60d0c74 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #39 0xf60d0ae4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #40 0xf6428ebc in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #41 0xf64302e0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #42 0xf63be330 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #43 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #44 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #45 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #46 0xf63bb9c8 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #47 0xf60d0c74 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #48 0xf60d0ae4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #49 0xf6428ebc in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #50 0xf63a2f28 in octave::tree_evaluator::eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, int&, int) ../libinterp/parse-tree/pt-eval.cc:1052
    #51 0xf63a3c78 in octave::tree_evaluator::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/parse-tree/pt-eval.cc:1111
    #52 0xf6e06c50 in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1502
    #53 0xf63152a4 in octave::Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:6432
    #54 0xf5e7d8b0 in octave_builtin::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:65
    #55 0xf5f9bfcc in octave_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-fcn.cc:57
    #56 0xf6428ebc in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #57 0xf64302e0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #58 0xf63be330 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #59 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #60 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #61 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #62 0xf63c0100 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:3981
    #63 0xf64100b8 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:84
    #64 0xf63bdf90 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #65 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #66 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #67 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #68 0xf63bd03c in octave::tree_evaluator::visit_if_command_list(octave::tree_if_command_list&) ../libinterp/parse-tree/pt-eval.cc:3629
    #69 0xf63dbd14 in octave::tree_if_command_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:118
    #70 0xf63bcaa4 in octave::tree_evaluator::visit_if_command(octave::tree_if_command&) ../libinterp/parse-tree/pt-eval.cc:3607
    #71 0xf644e16c in octave::tree_if_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-select.h:151
    #72 0xf63bdf90 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #73 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #74 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #75 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #76 0xf63c1aa0 in octave::tree_evaluator::visit_unwind_protect_command(octave::tree_unwind_protect_command&) ../libinterp/parse-tree/pt-eval.cc:4126
    #77 0xf64101b4 in octave::tree_unwind_protect_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:151
    #78 0xf63bdf90 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #79 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #80 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #81 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #82 0xf63b7918 in octave::tree_evaluator::visit_simple_for_command(octave::tree_simple_for_command&) ../libinterp/parse-tree/pt-eval.cc:3166
    #83 0xf643b414 in octave::tree_simple_for_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-loop.h:191
    #84 0xf63bdf90 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3756
    #85 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #86 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #87 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #88 0xf63bb9c8 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&) ../libinterp/parse-tree/pt-eval.cc:3512
    #89 0xf60d0c74 in octave_user_function::execute(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:495
    #90 0xf60d0ae4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.cc:488
    #91 0xf6428ebc in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:408
    #92 0xf64302e0 in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:108
    #93 0xf63be330 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:3781
    #94 0xf6452a68 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:124
    #95 0xf63bf1a4 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:3866
    #96 0xf5d87334 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:201
    #97 0xf63a268c in octave::tree_evaluator::eval(std::shared_ptr<octave::tree_statement_list>&, bool) ../libinterp/parse-tree/pt-eval.cc:984
    #98 0xf63a0ddc in octave::tree_evaluator::repl() ../libinterp/parse-tree/pt-eval.cc:803
    #99 0xf6e0533c in octave::interpreter::main_loop() ../libinterp/corefcn/interpreter.cc:1340
    #100 0xf6df5fcc in octave::interpreter::execute() ../libinterp/corefcn/interpreter.cc:908
    #101 0xf511306c in octave::cli_application::execute() ../libinterp/octave.cc:425
    #102 0x802840 in main ../src/main-cli.cc:121
    #103 0xf2690e20 in __libc_start_main csu/libc-start.c:332

Address 0xff9ce494 is located in stack of thread T0
SUMMARY: AddressSanitizer: stack-use-after-scope ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:9986 in __interceptor_sigaltstack
Shadow bytes around the buggy address:
  0x3ff39c40: f8 00 00 00 00 00 f8 f8 00 00 f8 f8 00 00 00 00
  0x3ff39c50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39c60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39c70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39c80: 00 00 00 00 00 00 00 00 00 00 00 00 f8 f8 f8 f8
=>0x3ff39c90: f8 f8[f8]f8 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f8 00
  0x3ff39cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39cc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39cd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x3ff39ce0: 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
  Shadow gap:              cc
==400363==ABORTING


Dmitri A. Sergatskov <dasergatskov>
Fri 25 Mar 2022 09:55:57 PM UTC, comment #15: 

I’ve made a new upload to Debian experimental: the 7.0.92 tarball on top of which I applied the three “drop mutable keyword” changesets by jwe.

Unfortunately it does not fix the issue. I got another segfault in bug-35881.tst on mipsel:
https://buildd.debian.org/status/fetch.php?pkg=octave&arch=mipsel&ver=7.0.92-2&stamp=1648241619&file=log

Sébastien Villemot <svillemot>
Fri 25 Mar 2022 05:21:42 PM UTC, comment #14: 

Note that since this bug is random, we can’t know for sure on which architectures it exists. It does for sure on 32-bit ARM and MIPS, but it may exist on other architectures without having been experienced/reported there.

Sébastien Villemot <svillemot>
Fri 25 Mar 2022 05:15:55 PM UTC, comment #13: 

You're right. I was thinking that it was failing because somehow both m_command and m_expression were becoming 0 inside tree_statement::line, hence returning -1, but on adding cout statements to that function, I see that exactly one of them is non-zero, as per spec, and that it never returns -1. Adding cout statements to tree_breakpoint::visit_break_command also shows cmd.line() to be greater than 0, so no problem there either.

Definitely difficult to localize, especially because it is restricted to 32-bit ARM and 32-bit MIPS.

Arun Giridhar <arungiridhar>
Group Member
Fri 25 Mar 2022 02:09:16 PM UTC, comment #12: 

@Arun I think you’re misunderstanding what’s going on. Here the segfault happens because 'm_expression' in the tree_statement::line() function is an invalid pointer, for some reason to be determined. Note that I could not get its value, since it has been optimized out.

Sébastien Villemot <svillemot>
Fri 25 Mar 2022 01:01:54 PM UTC, comment #11: 

The sequence seems to be:

1. In the process of cleaning up, the function remove_all_breakpoints() is called.

2. In the process of getting a list of breakpoints to clean up one by one, it is going through a list of relevant lines and expressions.

3. Finding none, it is returning -1 for line number or expression number.

4. In certain circumstances (32 bit architecture etc), this causes a segfault.

The location seems to be this in pt-bp.cc:


    117   void
    118   tree_breakpoint::visit_break_command (tree_break_command& cmd)
    119   {
    120     if (cmd.line () >= m_line)
    121       take_action (cmd);
    122   }


What happens here if cmd.line() is -1? Will the take_action() always be skipped? Can m_line ever be -1?

Arun Giridhar <arungiridhar>
Group Member
Fri 25 Mar 2022 10:56:07 AM UTC, comment #10: 

It’s indeed possible that I’m experiencing several different random bugs. But I also observe that with Octave 6 there was barely any testsuite crash on Debian build daemons, while with Octave 7 crashes have been quite frequent (1 over 9 builds with 7.0.90, 4 over 12 builds with 7.0.92). As I already said, the current situation with Octave 7 is really problematic from Debian’s point of view, and I don’t really know what we are going to do if they are not fixed before the final release.

I finally got a backtrace for the initial problem reported in this bug (segfault in bug-35881/bug-35881.tst). I got it with 7.0.92 on mipsel:


  fixed/bug-35881/bug-35881.tst ..................................
Thread 1 "octave-cli" received signal SIGSEGV, Segmentation fault.
0x7755daf4 in octave::tree_statement::line (this=<optimized out>) at libinterp/parse-tree/pt-stmt.cc:123
123                 : (m_expression ? m_expression->line () : -1));
(gdb) bt
#0  0x7755daf4 in octave::tree_statement::line (this=<optimized out>) at libinterp/parse-tree/pt-stmt.cc:123
#1  octave::tree_statement::line (this=<optimized out>) at libinterp/parse-tree/pt-stmt.cc:119
#2  0x7751cd24 in octave::tree_breakpoint::visit_statement (stmt=..., this=0x7fff0600) at libinterp/parse-tree/pt-bp.cc:322
#3  octave::tree_breakpoint::visit_statement (this=0x7fff0600, stmt=...) at libinterp/parse-tree/pt-bp.cc:312
#4  0x7751bcd0 in octave::tree_statement::accept (tw=..., this=<optimized out>) at libinterp/parse-tree/pt-stmt.h:124
#5  octave::tree_breakpoint::visit_statement_list (this=0x7fff0600, lst=...) at libinterp/parse-tree/pt-bp.cc:337
#6  0x7755eaf0 in octave::tree_statement_list::accept (tw=..., this=0x55b64ae0) at libinterp/parse-tree/pt-stmt.h:201
#7  octave::tree_statement_list::list_breakpoints (this=0x55b64ae0) at libinterp/parse-tree/pt-stmt.cc:224
#8  0x7755f44c in octave::tree_statement_list::remove_all_breakpoints (this=0x55b64ae0, evmgr=...,
    file="/home/sebastien/octave7092/share/octave/7.0.92/m/gui/listdlg.m") at libinterp/parse-tree/pt-stmt.cc:284
#9  0x7740acc4 in octave_user_code::~octave_user_code (this=0x55e5ab00, __in_chrg=<optimized out>) at libinterp/octave-value/ov-usr-fcn.cc:81
#10 0x7740b0b4 in octave_user_function::~octave_user_function (this=0x55e5ab00, __in_chrg=<optimized out>) at libinterp/octave-value/ov-usr-fcn.cc:237


As you can see, this is an optimized build because this hardware is so slow that repeateadly running the testsuite on an unoptimized build takes forever. However, if you need more information about the contents of the data structures, I can try to see if I can reproduce it without optimization.



Sébastien Villemot <svillemot>
Thu 24 Mar 2022 02:10:40 PM UTC, comment #9: 

I see from https://hg.savannah.gnu.org/hgweb/octave/rev/243b51ec9ff0 and bug #61821 that having a variable such as time_t be 64 bits on one architecture and 32 on another can cause problems. Could something similar be the case here with a different variable?

Arun Giridhar <arungiridhar>
Group Member
Thu 24 Mar 2022 12:18:23 PM UTC, comment #8: 

@jwe: Thanks for pushing that change.

@svillemot: We've also seen very random (but rare) segfaults when running the test suite in our CI. See bug #57591.
Unfortunately, those segfaults are rare and difficult to track down because they are hard to reproduce.
Maybe you are seeing the same occasional crashes in your tests?
(The initial errors that presumably segfaulted all at the same test could have been something different though.)

We decided to not block the release on bug #57591 because that would probably delay it for an unpredictable time (maybe indefinitely?). And those segfaults are very rare. In fact, we didn't receive reports about them other than when running the test suite as far as I'm aware.

It would be good if we had a way to reproduce them more reliably though.

Markus Mützel <mmuetzel>
Group administrator
Thu 24 Mar 2022 05:33:27 AM UTC, comment #7: 

I don't know that it will help, but I removed the uses of the mutable keyword for load_path class members in the following changeset on stable and also merged with default:

http://hg.savannah.gnu.org/hgweb/octave/rev/2f2e875d93fa

Even if it doesn't fix the problem reported here, that's a change that should have been done long ago.

John W. Eaton <jwe>
Group administrator
Wed 23 Mar 2022 02:44:07 PM UTC, comment #6: 

I get segfaults on x86 (32-bit). It’s not easy to reproduce, I’d say that it happens in less than 5% of the testsuite runs. I did not try with x86-64.

In my latest run, the segfault happened in the tests for sparse/eigs.m. Previous time it was somewhere else.

I haven’t yet managed to extract more information. ASAN did not display anything meaningful at the crash point. I’ll continue trying with gdb to get a backtrace.

Sébastien Villemot <svillemot>
Wed 23 Mar 2022 01:02:47 PM UTC, comment #5: 

jwe mentioned a possible cause for compiler "mis-optimizations" in our load_path implementation yesterday. He prepared a patch that might avoid that issue. I'll attach his patch here.

Could you please try compiling with that patch? Does it make any difference?
Given the test where armhf segfaulted in your latest attempt, I'm not very confident it'll make a difference though. (But maybe those are two different crashes?)

When you write that you could reproduce the segfault on x86, was that also a 32-bit platform? Which was the last test in the logs in that case?

Afaict, openmp is enabled by default if it is supported by the compiler. So, I'd guess that it is enabled for most others, too.
But afaict, Octave doesn't use OpenMP itself. (Some dependencies that might be loaded dynamically might do though.)

(file #53010)

Markus Mützel <mmuetzel>
Group administrator
Wed 23 Mar 2022 10:03:38 AM UTC, comment #4: 

After running the testsuite several times on x86, I got a segfault there.

It’s good news in the sense that we can now investigate this issue on faster and more widely available hardware.

Another information that I forgot to mention: the Debian package is built with --enable-openmp. I don’t know if this is related to this bug, but it’s good to have in mind.

Sébastien Villemot <svillemot>
Wed 23 Mar 2022 09:14:16 AM UTC, comment #3: 

It seems that the problem is not actually tied to bug-35881/bug-35881.tst.

I’ve launch rebuilds of octave 7.0.92 on armel, armhf and mipsel. It suceeded the second time on armel. It failed on armhf, but at a different place:
https://buildd.debian.org/status/fetch.php?pkg=octave&arch=armhf&ver=7.0.92-1&stamp=1647985090&raw=0
The build is not yet finished on mipsel.

I’ve also tried to replicate the problem on other armhf and mipsel machines, and there the build suceeded.

So it looks like it’s a random issue, maybe a race condition or an invalid memory write that does not always cause a crash. It may actually be the same issue as bug #61911, contrary to what I initially thought.

I’m going to try to extract more information, probably by rebuilding with ASAN.

I also wonder whether this is a 32-bit specific issue, since so far it has only manifested on 32-bit architectures. However it has not yet shown up on 32-bit x86, I’m also going to see if I can reproduce it there.

Also note that this issue is a real blocker for Debian. We cannot ship a package that randomly segfaults on several release architectures, in particular at build time.

Sébastien Villemot <svillemot>
Tue 22 Mar 2022 07:34:44 AM UTC, comment #2: 

Thanks for all the hard Debian testing work @svillemot and I am very sorry if the change mentioned by @mmuetzel caused you any trouble.

To easily test any correlation with that change, was it possible to apply a patch to the extracted Octave tarball before building on those machines?  The following patch simply disables the subdir-modification check.


diff -r 82c1554c4a64 libinterp/corefcn/load-path.cc
--- a/libinterp/corefcn/load-path.cc        Sat Mar 19 16:55:30 2022 +0100
+++ b/libinterp/corefcn/load-path.cc        Tue Mar 22 16:30:03 2022 +0900
@@ -1419,8 +1419,7 @@ OCTAVE_NAMESPACE_BEGIN
                 const dir_info& di = p->second;

                 if ((fs.mtime () + fs.time_resolution ()
-                     > di.dir_time_last_checked)
-                    || subdirs_modified (dir_name, dir_time_last_checked))
+                     > di.dir_time_last_checked))
                   initialize ();
                 else
                   {
@@ -1454,8 +1453,7 @@ OCTAVE_NAMESPACE_BEGIN
           }
       }
     // Absolute path, check timestamp to see whether it requires re-caching
-    else if (fs.mtime () + fs.time_resolution () > dir_time_last_checked
-             || subdirs_modified (dir_name, dir_time_last_checked))
+    else if (fs.mtime () + fs.time_resolution () > dir_time_last_checked)
       initialize ();

     return true;


Kai Torben Ohlhus <siko1056>
Group Member
Mon 21 Mar 2022 12:24:29 PM UTC, comment #1: 

Browsing through the changes that were done since 7.0.90 was tagged, there wasn't much that could have affected that test afaict.
Maybe hg id 7e5e77ef09d7?
https://hg.savannah.gnu.org/hgweb/octave/rev/7e5e77ef09d7

In that phase of the test suite, the current directory changes rapidly. That leads to rapid updates of the load path. Maybe some concurrency issue?
But that is nothing more than a guess.

Are you able to log into these machines and run commands or acquire backtraces?
It'd be interesting to see if the segfault also occurs if you `cd` to the directory containing the test files and run the test manually.

CC'ing Kai in case he can comment on whether it could be caused by that change.


Markus Mützel <mmuetzel>
Group administrator
Mon 21 Mar 2022 10:58:32 AM UTC, original submission:  

Hi,

I have uploaded version 7.0.92 to Debian experimental. The build fails on three release architectures: armel (ARMv5 32-bit without hardware float), armhf (ARMv7 32-bit with hardware float) and mipsel (MIPS 32-bit little endian).

In the three cases, the testsuite segfaults in bug-35881/bug-35881.tst. Here are the build logs:
- armel: https://buildd.debian.org/status/fetch.php?pkg=octave&arch=armel&ver=7.0.92-1&stamp=1647717594&raw=0
- armhf: https://buildd.debian.org/status/fetch.php?pkg=octave&arch=armhf&ver=7.0.92-1&stamp=1647714586&raw=0
- mipsel: https://buildd.debian.org/status/fetch.php?pkg=octave&arch=mipsel&ver=7.0.92-1&stamp=1647728470&raw=0

Note that this is a regression compared to 7.0.90, because the build was fine with armhf and mipsel (for armel there was another problem, now apparently fixed, see bug #61911).

Let me know if you need more details.

Sébastien

Sébastien Villemot <svillemot>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #53041:  uicontrol-mem-patch.txt added by jwe (682B - text/plain)
file #53039:  no-user-frame-search.txt added by jwe (546B - text/plain)
file #53038:  no-current-frame.txt added by jwe (484B - text/plain)
file #53035:  omit-backtrace-frames.txt added by jwe (778B - text/plain)
file #53034:  omit-stack-trace.txt added by jwe (1KiB - text/plain)
file #53033:  exe-except-copy.txt added by jwe (440B - text/plain)
file #53027:  throw-error-diff.txt added by jwe (355B - text/plain)

 

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 arungiridhar (Posted a comment)
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by siko1056 (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by mmuetzel
  • -email is unavailable- added by svillemot (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 15 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-04-12 mmuetzel StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2022-04-04 jwe StatusNeed Info Ready For Test
    2022-04-04 jwe Attached File- Added uicontrol-mem-patch.txt, #53041
    2022-04-03 jwe Attached File- Added no-user-frame-search.txt, #53039
    2022-04-03 jwe Attached File- Added no-current-frame.txt, #53038
    2022-04-02 jwe Attached File- Added omit-backtrace-frames.txt, #53035
    2022-04-02 jwe Attached File- Added omit-stack-trace.txt, #53034
    2022-04-02 jwe Attached File- Added exe-except-copy.txt, #53033
    2022-04-01 jwe Attached File- Added throw-error-diff.txt, #53027
    2022-03-23 mmuetzel Attached File- Added load-path-mutable-diffs.txt, #53010
    2022-03-22 siko1056 StatusNone Need Info
    2022-03-21 mmuetzel Releaseother 7.0.92
    2022-03-21 mmuetzel CategoryNone Interpreter
        Carbon-Copy- Added siko1056

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code