octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51552] AddressSanitizer: stack-use-after-scop


From: Dmitri A. Sergatskov
Subject: [Octave-bug-tracker] [bug #51552] AddressSanitizer: stack-use-after-scope error in Array.h
Date: Sun, 23 Jul 2017 21:53:58 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

URL:
  <http://savannah.gnu.org/bugs/?51552>

                 Summary: AddressSanitizer: stack-use-after-scope error in
Array.h
                 Project: GNU Octave
            Submitted by: dasergatskov
            Submitted on: Mon 24 Jul 2017 01:53:56 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Segfault, Bus Error, etc.
                  Status: None
             Assigned to: None
         Originator Name: Dmitri A. Sergatskov
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When built with "enable-address-sanitizer-flags" octave crashed 
in multiple tests with 

SUMMARY: AddressSanitizer: stack-use-after-scope
../liboctave/array/Array.h:257 in Array<octave_value>::Array()


error. (Array.h is attached)

E.g. running 

octave:1> test libinterp/corefcn/Cell.cc-tst verbose
>>>>> /home/dima/src/octave/gcc_asan/libinterp/corefcn/Cell.cc-tst
***** test
 a = {"foo", "bar"};
 assert (a(), a);
***** error <wrong type argument 'cell array'> nnz ({0, 1, 2})
=================================================================
==31489==ERROR: AddressSanitizer: stack-use-after-scope on address
0x7ffd91b06350 at pc 0x7f7d98957e67 bp 0x7ffd91b06050 sp 0x7ffd91b06040
WRITE of size 8 at 0x7ffd91b06350 thread T0
    #0 0x7f7d98957e66 in Array<octave_value>::Array()
../liboctave/array/Array.h:257
    #1 0x7f7d98957e66 in octave_value_list::octave_value_list()
../libinterp/octave-value/ovl.h:46
    #2 0x7f7d99cb7e59 in
octave::tree_evaluator::visit_identifier(octave::tree_identifier&)
../libinterp/parse-tree/pt-eval.cc:1035
 

(full log is attached).

One needs to have at least gcc 7 to get stack-use-after-scope diagnostic. See


https://gcc.gnu.org/gcc-7/changes.html


Dmitri.
-- 




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 24 Jul 2017 01:53:56 AM UTC  Name: Array.h  Size: 27KiB   By:
dasergatskov

<http://savannah.gnu.org/bugs/download.php?file_id=41309>
-------------------------------------------------------
Date: Mon 24 Jul 2017 01:53:56 AM UTC  Name:
octave_stack-use-after-scope_log.txt  Size: 12KiB   By: dasergatskov

<http://savannah.gnu.org/bugs/download.php?file_id=41310>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51552>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]