https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86469
Bug ID: 86469 Summary: Dwarf Error: Offset (1678049557) greater than or equal to .debug_str size (5846). Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jg at jguk dot org Target Milestone: --- Is this a known issue? I saw some other tickets but am not knowledgeable. Or is it an LD issue? It's easy enough to reproduce, it is a function which doesn't match the protottype void get_err_whois(int wh_res, string & err_str); void get_err_whois(wh_res_e wh_res, string & err_str) { // implementation } I don't yet have a small test case. $ g++-8 --version g++-8 (Ubuntu 8-20180414-1ubuntu2) 8.0.1 20180414 (experimental) [trunk revision 259383] Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make g++-8 -std=c++11 -g -ggdb -pthread -O0 -Werror -Wextra -Wshadow -Wformat-nonliteral -Wall -Wnonnull -Wpedantic -fstack-protector-strong -Wdiv-by-zero -Wsign-conversion -Wnull-dereference -flto -Wno-nonnull-compare -o proc main.cpp test_whois.cpp <snip file list> /usr/bin/x86_64-linux-gnu-ld: Dwarf Error: Offset (1678049557) greater than or equal to .debug_str size (5846). /usr/bin/x86_64-linux-gnu-ld: Dwarf Error: Invalid abstract instance DIE ref. /tmp/ccDxn2Yd.ltrans0.ltrans.o: In function `process_whois(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, domain_s&)': <artificial>:(.text+0xd554): undefined reference to `get_err_whois(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' <artificial>:(.text+0xd75b): undefined reference to `get_err_whois(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' <artificial>:(.text+0xdbca): undefined reference to `get_err_whois(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' /tmp/ccDxn2Yd.ltrans0.ltrans.o: In function `get_whois(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, whoisinfo&, bool&, bool, bool, EWhois_t)': <artificial>:(.text+0x20717): undefined reference to `get_err_whois(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' /tmp/ccDxn2Yd.ltrans0.ltrans.o: In function `test_whois(bool)': <artificial>:(.text+0x6e827): undefined reference to `get_err_whois(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)' collect2: error: ld returned 1 exit status makefile:3: recipe for target 'all' failed make: *** [all] Error 1