[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52025] Memory issue with mkoctfile and hellow
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #52025] Memory issue with mkoctfile and helloworld.cc |
Date: |
Thu, 14 Sep 2017 16:19:52 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
URL:
<http://savannah.gnu.org/bugs/?52025>
Summary: Memory issue with mkoctfile and helloworld.cc
Project: GNU Octave
Submitted by: rik5
Submitted on: Thu 14 Sep 2017 01:19:51 PM PDT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Segfault, Bus Error, etc.
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
Compiling helloworld.cc from within Octave with mkoctfile and then running the
resulting .oct file produces a segfault. It is only a segfault when there are
outputs requested from helloworld.cc.
octave:4> setenv ('CXXFLAGS', '-O0 -ggdb3 -fsanitize=address -pipe')
octave:5> mkoctfile -v helloworld.cc
g++ -std=gnu++11 -c -fPIC -I/home/rik/local/include/octave-4.3.0+/octave/..
-I/home/rik/local/include/octave-4.3.0+/octave -I/home/rik/local/include
-pthread -fopenmp -O0 -ggdb3 -fsanitize=address -pipe helloworld.cc -o
helloworld.o
g++ -std=gnu++11 -I/home/rik/local/include/octave-4.3.0+/octave/..
-I/home/rik/local/include/octave-4.3.0+/octave -I/home/rik/local/include
-pthread -fopenmp -O0 -ggdb3 -fsanitize=address -pipe -shared -Wl,-Bsymbolic
-o helloworld.oct helloworld.o -L/home/rik/local/lib/octave/4.3.0+
-L/home/rik/local/lib -loctinterp -loctave
octave:6> helloworld (1,2)
Hello World has 2 input arguments and 0 output arguments.
octave:7> [a,b] = helloworld (1,2)
The resulting backtrace is
ASAN:SIGSEGV
=================================================================
==6080==ERROR: AddressSanitizer: SEGV on unknown address 0x7fe7cdeab9e8 (pc
0x7fe7b63c58a6 bp 0x7ffd8cdd0f60 sp 0x7ffd8cdd0f50 T0)
#0 0x7fe7b63c58a5 in octave::refcount<long>::operator++(int)
/home/rik/local/include/octave-4.3.0+/octave/../octave/oct-refcount.h:91
#1 0x7fe7b63c4bc4 in octave_value::operator=(octave_value const&)
/home/rik/local/include/octave-4.3.0+/octave/../octave/ov.h:362
#2 0x7fe7b63c3d4e in Fhelloworld(octave_value_list const&, int)
/home/rik/wip/Projects_Mine/octave-dbg/examples/code/helloworld.cc:13
#3 0x7fe7cd4053fe in octave_builtin::call(octave::tree_evaluator&, int,
octave_value_list const&) libinterp/octave-value/ov-builtin.cc:65
#4 0x7fe7cd6faaa1 in
octave::tree_evaluator::visit_index_expression(octave::tree_index_expression&)
libinterp/parse-tree/pt-eval.cc:1252
#5 0x7fe7cd72d9ec in
octave::tree_index_expression::accept(octave::tree_walker&)
libinterp/parse-tree/pt-idx.h:101
#6 0x7fe7cd585556 in
octave::tree_evaluator::evaluate_n(octave::tree_expression*, int)
libinterp/parse-tree/pt-eval.h:284
#7 0x7fe7cd6fdd3f in
octave::tree_evaluator::visit_multi_assignment(octave::tree_multi_assignment&)
libinterp/parse-tree/pt-eval.cc:1751
#8 0x7fe7cd6e5b5a in
octave::tree_multi_assignment::accept(octave::tree_walker&)
libinterp/parse-tree/pt-assign.h:148
#9 0x7fe7cd485e92 in
octave::tree_evaluator::evaluate(octave::tree_expression*, int)
libinterp/parse-tree/pt-eval.h:271
#10 0x7fe7cd701164 in
octave::tree_evaluator::visit_statement(octave::tree_statement&)
libinterp/parse-tree/pt-eval.cc:2209
#11 0x7fe7cd73f13e in octave::tree_statement::accept(octave::tree_walker&)
libinterp/parse-tree/pt-stmt.h:112
#12 0x7fe7cd70147f in
octave::tree_evaluator::visit_statement_list(octave::tree_statement_list&)
libinterp/parse-tree/pt-eval.cc:2251
#13 0x7fe7cd486730 in
octave::tree_statement_list::accept(octave::tree_walker&)
libinterp/parse-tree/pt-stmt.h:187
#14 0x7fe7cdb886e4 in octave::interpreter::main_loop()
libinterp/corefcn/interpreter.cc:974
#15 0x7fe7cdb86577 in octave::interpreter::execute()
libinterp/corefcn/interpreter.cc:695
#16 0x7fe7ccedd3eb in octave::cli_application::execute()
libinterp/octave.cc:384
#17 0x401d7c in main src/main-cli.cc:90
#18 0x7fe7ca66282f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
#19 0x401808 in _start
(/home/rik/wip/Projects_Mine/octave-dbg/src/.libs/lt-octave-cli+0x401808)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV
/home/rik/local/include/octave-4.3.0+/octave/../octave/oct-refcount.h:91
octave::refcount<long>::operator++(int)
==6080==ABORTING
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52025>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52025] Memory issue with mkoctfile and helloworld.cc,
Rik <=