This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/24401] New: backtrace_symbols not accurate with optimisation -O1
- From: "jg at jguk dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 30 Mar 2019 23:06:14 +0000
- Subject: [Bug libc/24401] New: backtrace_symbols not accurate with optimisation -O1
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=24401
Bug ID: 24401
Summary: backtrace_symbols not accurate with optimisation -O1
Product: glibc
Version: 2.27
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: jg at jguk dot org
CC: drepper.fsp at gmail dot com
Target Milestone: ---
Created attachment 11710
--> https://sourceware.org/bugzilla/attachment.cgi?id=11710&action=edit
test case
$ ldd --version
ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
Test case attached
$ g++-8 -g -pipe -pthread -O1 -o exception4 exception4.cpp
$ ./exception4
Unhandled C++ exception: [vector::_M_range_check: __n (which is 0) >=
this->size() (which is 0)]
Backtrace:
0x0000000000001573: test() at basic_string.h:176
[1]: ./exception4(+0x1573) [0x55c1fcff3573]
0x00000000000015d9: main at exception4.cpp:93
[2]: ./exception4(+0x15d9) [0x55c1fcff35d9]
0x0000000000000000: ?? ??:0
[3]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f4152662b97]
0x000000000000108a: _start at ??:?
[4]: ./exception4(+0x108a) [0x55c1fcff308a]
Expected:
$ g++-8 -Wall -g -o exception4 exception4.cpp
$ ./exception4
Unhandled C++ exception: [vector::_M_range_check: __n (which is 0) >=
this->size() (which is 0)]
Backtrace:
0x0000000000001505: test() at exception4.cpp:81
[1]: ./exception4(+0x1505) [0x562022cdd505]
0x000000000000156c: main at exception4.cpp:93
[2]: ./exception4(+0x156c) [0x562022cdd56c]
0x0000000000000000: ?? ??:0
[3]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f2923475b97]
0x0000000000000fea: _start at ??:?
[4]: ./exception4(+0xfea) [0x562022cdcfea]
--
You are receiving this mail because:
You are on the CC list for the bug.