[Bug libstdc++/88923] New: abi::__cxa_demangle segfault on a specific string
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88923 Bug ID: 88923 Summary: abi::__cxa_demangle segfault on a specific string Product: gcc Version: 7.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: antanubis at gmail dot com Target Milestone: --- I use "dump_syms" util from Google Breakpad to extract debug symbols from my binaries and at some version it started segfaulting. I've found the exact string on which the call to abi::__cxa_demangle crashes and it reproduces in a standalone example (name 'test.cpp'): #include #include int main() { const char *symbol = "_ZNSt11_Tuple_implILm0EJN3rpl8producerIN4base5flagsIN11MTPDchannel4FlagEEENS0_8no_errorEZNS0_7details10map_helperIZN4Data18FlagsValueWithMaskINSA_5FlagsIS6_Lj2147486693EE6ChangeES7_ZNS8_11then_helperISE_S7_ZNKS0_12event_streamISE_E6eventsEvEUlRKT_E_EclISE_S7_ZNS0_6singleISE_EEDaOSI_EUlSK_E_SE_S7_EEDaONS1_ISI_T0_T1_EEEUlSK_E_EEDaSU_NSI_4TypeEEUlRKSE_E0_EclISE_S7_ZNS8_13filter_helperIZNSB_ISE_S7_SV_EEDaSU_SW_EUlSY_E_EclISE_S7_SV_vEEDaSU_EUlSK_E_S6_EEDaSU_EUlSK_E_EENS1_IbS7_ZNS9_IZNSA_15SingleFlagValueINSC_INS3_IN19MTPDchatAdminRights4FlagEEELj4294967295EE6ChangeES7_ZNSF_IS1E_S7_ZNKSG_IS1E_E6eventsEvEUlSK_E_EclIS1E_S7_ZNSO_IS1E_EEDaSP_EUlSK_E_S1E_S7_EEDaSU_EUlSK_E_EEDaSU_NSI_4EnumEEUlS1C_E_EclIS1C_S7_ZNS9_IZNSB_IS1E_S7_S1K_EEDaSU_SW_EUlRKS1E_E0_EclIS1E_S7_ZNS12_IZNSB_IS1E_S7_S1K_EEDaSU_SW_EUlS1Q_E_EclIS1E_S7_S1K_vEEDaSU_EUlSK_E_S1C_EEDaSU_EUlSK_E_bEEDaSU_EUlSK_E_EENS1_IbS7_ZNS9_IZNS19_INSC_INS3_IN20MTPDchatBannedRights4FlagEEELj4294967295EE6ChangeES7_ZNSF_IS25_S7_ZNKSG_IS25_E6eventsEvEUlSK_E_EclIS25_S7_ZNSO_IS25_EEDaSP_EUlSK_E_S25_S7_EEDaSU_EUlSK_E_EEDaSU_S1L_EUlS23_E_EclIS23_S7_ZNS9_IZNSB_IS25_S7_S2B_EEDaSU_SW_EUlRKS25_E0_EclIS25_S7_ZNS12_IZNSB_IS25_S7_S2B_EEDaSU_SW_EUlS2G_E_EclIS25_S7_S2B_vEEDaSU_EUlSK_E_S23_EEDaSU_EUlSK_E_bEEDaSU_EUlSK_E_EES2Q_EED2Ev.lto_priv.19273"; int status = 0; char* demangled_c = abi::__cxa_demangle(symbol, NULL, NULL, &status); if (status == 0) { std::cout << demangled_c << std::endl; } else { std::cout << "Error: " << status << std::endl; } if (demangled_c) { free(reinterpret_cast(demangled_c)); } return 0; } This program compiled with "gcc test.cpp -lstdc++" crashes for me on gcc 7.4 on Ubuntu 14.04 and on gcc 7.3 on Ubuntu 18.04.
[Bug libstdc++/88923] abi::__cxa_demangle segfault on a specific string
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88923 --- Comment #1 from Vasilii Babich --- Created attachment 45466 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45466&action=edit test.cpp to reproduce the segfault This program crashes for me when compiled with "gcc test.cpp -lstdc++" on both gcc 7.3 and gcc 7.4.
[Bug c++/83481] New: ICE in const-ref structured bindings.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83481 Bug ID: 83481 Summary: ICE in const-ref structured bindings. Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: antanubis at gmail dot com Target Milestone: --- Created attachment 42913 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42913&action=edit preprocessed source file Preprocessed source is attached. This command: g++ -x c++-cpp-output -std=c++1z -c file_upload.i -o file_upload.o on Ubuntu 14.04 with "g++ (Ubuntu 7.2.0-1ubuntu1~14.04) 7.2.0" gives this output: /home/preston/Telegram/tdesktop/Telegram/SourceFiles/storage/file_upload.cpp: In member function ‘void Storage::Uploader::clear()’: /home/preston/Telegram/tdesktop/Telegram/SourceFiles/storage/file_upload.cpp:325:46: internal compiler error: Segmentation fault for (const auto &[requestId, requestData] : requestsSent) { ^~~~ 0xadf5cf crash_signal ../../src/gcc/toplev.c:337 0x5ae610 vec::iterate(unsigned int, tree_node**) const ../../src/gcc/vec.h:773 0x5ae610 find_decomp_class_base ../../src/gcc/cp/decl.c:7246 0x5cb7ed cp_finish_decomp(tree_node*, tree_node*, unsigned int) ../../src/gcc/cp/decl.c:7590 0x62bfae cp_convert_range_for(tree_node*, tree_node*, tree_node*, tree_node*, unsigned int, bool) ../../src/gcc/cp/parser.c:11745 0x648781 cp_parser_range_for ../../src/gcc/cp/parser.c:11577 0x655d87 cp_parser_for ../../src/gcc/cp/parser.c:11448 0x655d87 cp_parser_iteration_statement ../../src/gcc/cp/parser.c:11981 0x634689 cp_parser_statement ../../src/gcc/cp/parser.c:10575 0x635b8d cp_parser_statement_seq_opt ../../src/gcc/cp/parser.c:11040 0x635c37 cp_parser_compound_statement ../../src/gcc/cp/parser.c:10994 0x6469c0 cp_parser_function_body ../../src/gcc/cp/parser.c:21455 0x6469c0 cp_parser_ctor_initializer_opt_and_function_body ../../src/gcc/cp/parser.c:21493 0x64d2f0 cp_parser_function_definition_after_declarator ../../src/gcc/cp/parser.c:26284 0x651aad cp_parser_function_definition_from_specifiers_and_declarator ../../src/gcc/cp/parser.c:26196 0x651aad cp_parser_init_declarator ../../src/gcc/cp/parser.c:19182 0x651e9d cp_parser_simple_declaration ../../src/gcc/cp/parser.c:12786 0x652b15 cp_parser_block_declaration ../../src/gcc/cp/parser.c:12611 0x6312d4 cp_parser_declaration ../../src/gcc/cp/parser.c:12509 0x6570ab cp_parser_declaration_seq_opt ../../src/gcc/cp/parser.c:12385 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.