[Bug c++/86469] Dwarf Error: Offset (1678049557) greater than or equal to .debug_str size (5846).

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jul 18 07:40:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86469

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jonny Grant from comment #11)
> Hi Richard
> 
> I have a smaller test case which. It shows only part of the error.
> "Dwarf Error: Invalid abstract instance DIE ref"
> 
> Richard, would this be useful?

Unfortunately this is only a spurious error caused by the later undefined
reference ones.  I have opened
https://sourceware.org/bugzilla/show_bug.cgi?id=23425 for this issue.

Given the original issue also reports undefined references the
DWARF error emitted there looks like hitting the very same issue.

Can you reproduce the DWARF errors without undefined references?

> 
> g++-8 -std=c++11 -g -ggdb -pthread -O0  -Wnonnull -fstack-protector-strong 
> -Wdiv-by-zero -Wsign-conversion -Wnull-dereference -flto
> -Wno-nonnull-compare -o proc whois_if.cpp test_whois.cpp stdio_cx.c
> cpputil.cpp 
> /usr/bin/x86_64-linux-gnu-ld: Dwarf Error: Invalid abstract instance DIE ref.
> /tmp/cctwveUb.ltrans0.ltrans.o: In function `test_whois(bool)':
> <artificial>:(.text+0xae6): undefined reference to `get_err_whois(int,
> std::__cxx11::basic_string<char, std::char_traits<char>,
> std::allocator<char> >&)'
> /tmp/cctwveUb.ltrans0.ltrans.o: In function `strerrno[abi:cxx11](int)':
> <artificial>:(.text+0x2c2a): undefined reference to `strerrno_s(char*,
> unsigned long, int)'
> collect2: error: ld returned 1 exit status
> makefile:3: recipe for target 'all' failed
> make: *** [all] Error 1


More information about the Gcc-bugs mailing list