bugGNU Octave - Bugs: bug #57438, Test suite error with address...

 
 

bug #57438: Test suite error with address sanitizer

Submitter:  Markus Mützel <mmuetzel>
Submitted:  Wed 18 Dec 2019 12:07:21 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 18 Dec 2019 12:38:31 PM UTC, comment #2: 

You are right. Closing as duplicate.

Markus Mützel <mmuetzel>
Group administrator
Wed 18 Dec 2019 12:33:31 PM UTC, comment #1: 

maybe caused by the same test case as in bug #57195?

in libinterp/octave-value/ov-cell.cc

there is this test:

%!error <out of memory> cell (1e24, 1);

A.R. Burgers <arb>
Wed 18 Dec 2019 12:07:21 PM UTC, original submission:  

Octave is configured with the following switches

export CFLAGS="-ggdb3 -O0 -pipe"
export CXXFLAGS="${CFLAGS}"
export FFLAGS="${CFLAGS}"
../configure --with-hdf5-includedir=/usr/include/hdf5/serial --with-hdf5-libdir=/usr/lib/x86_64-linux-gnu/hdf5/serial --prefix=${HOME}/usr --enable-address-sanitizer-flags -C

export ASAN_OPTIONS="leak_check_at_exit=0:verbosity=0:abort_on_error=1"


When running the test suite, the address sanitizer reports the following in ov-cell.cc-tst:

  libinterp/octave-value/ov-cell.cc-tst ..........................=================================================================
==35775==ERROR: AddressSanitizer: requested allocation size 0xffffffffffffffff (0x800 after adjustments for alignment, red zones etc.) exceeds maximum supported size of 0x10000000000 (thread T5 (QThread))
    #0 0x7ffff768aa67 in operator new[](unsigned long) (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10fa67)
    #1 0x7ffff51f88ac in Array<octave_value>::ArrayRep::ArrayRep(long) ../liboctave/array/Array.h:158
    #2 0x7ffff51e6e5f in Array<octave_value>::Array(dim_vector const&, octave_value const&) ../liboctave/array/Array.h:273
    #3 0x7ffff53cb5d4 in Cell::Cell(dim_vector const&, octave_value const&) ../libinterp/corefcn/Cell.h:61
    #4 0x7ffff543af0b in Fcell(octave_value_list const&, int) ../libinterp/octave-value/ov-cell.cc:1274
    #5 0x7ffff542a45b in octave_builtin::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:62
    #6 0x7ffff58927b6 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:518
    #7 0x7ffff5895e4a in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:106
    #8 0x7ffff584c042 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2720
    #9 0x7ffff58b0a38 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:121
    #10 0x7ffff584c5f0 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2779
    #11 0x7ffff535f3c2 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:198
    #12 0x7ffff5849e63 in octave::tree_evaluator::execute_user_function(octave_user_function&, int, octave_value_list const&, octave::stack_frame*) ../libinterp/parse-tree/pt-eval.cc:2440
    #13 0x7ffff56173fc in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&, octave::stack_frame*) ../libinterp/octave-value/ov-usr-fcn.cc:464
    #14 0x7ffff561edc4 in octave_user_function::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-usr-fcn.h:376
    #15 0x7ffff58927b6 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:518
    #16 0x7ffff58382ff 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:503
    #17 0x7ffff5838f81 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:562
    #18 0x7ffff60b7d1b in octave::interpreter::eval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int) ../libinterp/corefcn/interpreter.cc:1429
    #19 0x7ffff57da411 in Feval(octave::interpreter&, octave_value_list const&, int) ../libinterp/parse-tree/oct-parse.yy:5368
    #20 0x7ffff542a60f in octave_builtin::call(octave::tree_evaluator&, int, octave_value_list const&) ../libinterp/octave-value/ov-builtin.cc:68
    #21 0x7ffff58927b6 in octave::tree_index_expression::evaluate_n(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.cc:518
    #22 0x7ffff5895e4a in octave::tree_index_expression::evaluate(octave::tree_evaluator&, int) ../libinterp/parse-tree/pt-idx.h:106
    #23 0x7ffff584c042 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2720
    #24 0x7ffff58b0a38 in octave::tree_statement::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:121
    #25 0x7ffff584c5f0 in octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&) ../libinterp/parse-tree/pt-eval.cc:2779
    #26 0x7ffff535f3c2 in octave::tree_statement_list::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-stmt.h:198
    #27 0x7ffff584d1b7 in octave::tree_evaluator::visit_try_catch_command(octave::tree_try_catch_command&) ../libinterp/parse-tree/pt-eval.cc:2890
    #28 0x7ffff587e506 in octave::tree_try_catch_command::accept(octave::tree_walker&) ../libinterp/parse-tree/pt-except.h:81
    #29 0x7ffff584be16 in octave::tree_evaluator::visit_statement(octave::tree_statement&) ../libinterp/parse-tree/pt-eval.cc:2698

==35775==HINT: if you don't care about these errors you may set allocator_may_return_null=1
SUMMARY: AddressSanitizer: allocation-size-too-big (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x10fa67) in operator new[](unsigned long)
Thread T5 (QThread) created by T0 here:
    #0 0x7ffff75b5805 in pthread_create (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a805)
    #1 0x7ffff06cd753 in QThread::start(QThread::Priority) (/usr/lib/x86_64-linux-gnu/libQt5Core.so.5+0xbe753)

==35775==ABORTING

Thread 6 "QThread" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe262a700 (LWP 35797)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50        ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff20ea899 in __GI_abort () at abort.c:79
#2  0x00007ffff76a65c2 in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#3  0x00007ffff76b116c in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#4  0x00007ffff769280c in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#5  0x00007ffff7691786 in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#6  0x00007ffff75a72ef in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#7  0x00007ffff75a37dd in ?? () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#8  0x00007ffff768aa26 in operator new[](unsigned long) () from /usr/lib/x86_64-linux-gnu/libasan.so.5
#9  0x00007ffff51f88ad in Array<octave_value>::ArrayRep::ArrayRep (this=0x603003243970, n=9223372036854775807)
    at ../liboctave/array/Array.h:158
#10 0x00007ffff51e6e60 in Array<octave_value>::Array (this=0x7fffe2612ee0, dv=..., val=...) at ../liboctave/array/Array.h:273
#11 0x00007ffff53cb5d5 in Cell::Cell (this=0x7fffe2612ee0, dv=..., val=...) at ../libinterp/corefcn/Cell.h:61
#12 0x00007ffff543af0c in Fcell (args=...) at ../libinterp/octave-value/ov-cell.cc:1274
#13 0x00007ffff542a45c in octave_builtin::call (this=0x6120001339c0, tw=..., nargout=0, args=...)
    at ../libinterp/octave-value/ov-builtin.cc:62
#14 0x00007ffff58927b7 in octave::tree_index_expression::evaluate_n (this=0x60e0004d74a0, tw=..., nargout=0)
    at ../libinterp/parse-tree/pt-idx.cc:518
#15 0x00007ffff5895e4b in octave::tree_index_expression::evaluate (this=0x60e0004d74a0, tw=..., nargout=0)
    at ../libinterp/parse-tree/pt-idx.h:106
#16 0x00007ffff584c043 in octave::tree_evaluator::visit_statement (this=0x622000030e90, stmt=...)
    at ../libinterp/parse-tree/pt-eval.cc:2720
#17 0x00007ffff58b0a39 in octave::tree_statement::accept (this=0x604001898f50, tw=...)
    at ../libinterp/parse-tree/pt-stmt.h:121
#18 0x00007ffff584c5f1 in octave::tree_evaluator::visit_statement_list (this=0x622000030e90, lst=...)
    at ../libinterp/parse-tree/pt-eval.cc:2779
#19 0x00007ffff535f3c3 in octave::tree_statement_list::accept (this=0x604001898e50, tw=...)
    at ../libinterp/parse-tree/pt-stmt.h:198
#20 0x00007ffff5849e64 in octave::tree_evaluator::execute_user_function (this=0x622000030e90, user_function=..., nargout=0,
    xargs=..., closure_frames=0x0) at ../libinterp/parse-tree/pt-eval.cc:2440
#21 0x00007ffff56173fd in octave_user_function::call (this=0x6140000b3040, tw=..., nargout=0, args=..., closure_frames=0x0)
    at ../libinterp/octave-value/ov-usr-fcn.cc:464
#22 0x00007ffff561edc5 in octave_user_function::call (this=0x6140000b3040, tw=..., nargout=0, args=...)
    at ../libinterp/octave-value/ov-usr-fcn.h:376
#23 0x00007ffff58927b7 in octave::tree_index_expression::evaluate_n (this=0x60e0001151e0, tw=..., nargout=0)
--Type <RET> for more, q to quit, c to continue without paging--q
Quit
(gdb) up 12
#12 0x00007ffff543af0c in Fcell (args=...) at ../libinterp/octave-value/ov-cell.cc:1274
1274          return ovl (Cell (dims));
(gdb) p dims
$1 = {rep = 0x6030014efcd0}
(gdb) p dims->rep
$2 = (octave_idx_type *) 0x6030014efcd0
(gdb) p *(dims->rep)
$3 = 9223372036854775807


Is "dims" a scalar with a very large value? Or am I mis-interpreting the variables?

Markus Mützel <mmuetzel>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arb (Posted a comment)
  • -email is unavailable- added by mmuetzel (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-18 mmuetzel StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #57195

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code