Created attachment 1719895 [details] preprocessed source gcc segfaults when compiling Firefox "unified" source file (merged source from a number of other ones). I should be able to identify the change in Firefox that caused the segfault, because there was no such issue in October 5th nightly build and October 6th has this issue (same for October 7th). command line used: /usr/bin/g++ -std=gnu++17 -o Unified_cpp_dom_indexedDB0.o -c -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/stl_wrappers -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/system_wrappers -include /mnt/dan/firefox.git/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/mnt/dan/firefox.git/dom/indexedDB -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dom/indexedDB -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/ipc/ipdl/_ipdlheaders -I/mnt/dan/firefox.git/ipc/chromium/src -I/mnt/dan/firefox.git/ipc/glue -I/mnt/dan/firefox.git/dom/base -I/mnt/dan/firefox.git/dom/storage -I/mnt/dan/firefox.git/ipc/glue -I/mnt/dan/firefox.git/third_party/sqlite3/src -I/mnt/dan/firefox.git/xpcom/build -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nspr -I/mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++2a-compat -Wduplicated-cond -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=coverage-mismatch -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wno-error=deprecated-copy -Wformat -Wformat-overflow=2 -Werror=implicit-function-declaration -Wno-psabi -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe -g -Og -fno-omit-frame-pointer -funwind-tables -Wno-error=shadow -MD -MP -MF .deps/Unified_cpp_dom_indexedDB0.o.pp -fdiagnostics-color Unified_cpp_dom_indexedDB0.cpp output: cc1plus: warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for C++ In file included from /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/indexedDB/Key.h:10, from /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/IDBCursorType.h:11, from /mnt/dan/firefox.git/dom/indexedDB/ActorsChild.h:12, from /mnt/dan/firefox.git/dom/indexedDB/ActorsChild.cpp:7, from Unified_cpp_dom_indexedDB0.cpp:2: /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/indexedDB/IDBResult.h: In instantiation of ‘mozilla::ErrorResult mozilla::dom::indexedDB::detail::IDBError<S>::ExtractErrorResult(SpecialValueMappers ...) [with SpecialValueMappers = {nsresult (*)(const std::integral_constant<mozilla::dom::indexedDB::IDBSpecialValue, mozilla::dom::indexedDB::IDBSpecialValue::Invalid>&)}; mozilla::dom::indexedDB::IDBSpecialValue ...S = {mozilla::dom::indexedDB::IDBSpecialValue::Invalid}]’: /mnt/dan/firefox.git/dom/indexedDB/IDBFactory.cpp:451:55: required from here /mnt/dan/firefox.git/obj-powerpc64le-unknown-linux-gnu/dist/include/mozilla/dom/indexedDB/IDBResult.h:106:26: internal compiler error: Neoprávněný přístup do paměti (SIGSEGV) 106 | return mVariant.match( | ~~~~~~~~~~~~~~^ 107 | [](ErrorResult& aException) { return std::move(aException); }, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 | [aSpecialValueMappers...](const SpecialConstant<S>& aSpecialValue) { | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 109 | return ErrorResult{aSpecialValueMappers(aSpecialValue)}; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 110 | }...); | ~~~~~ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/cchFugMG.out file, please attach this to your bugreport. Version-Release number of selected component (if applicable): gcc-10.2.1-1.fc32.ppc64le (my test machine) gcc-9.3.1-2.fc31.{ppc64le,s390x,x86_64} (our multiarch CI)
backtrace from /usr/libexec/gcc/ppc64le-redhat-linux/10/cc1plus (no debuginfos installed yet) Program received signal SIGSEGV, Segmentation fault. 0x000000001090b530 in tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*) () (gdb) where #0 0x000000001090b530 in tsubst_pack_expansion(tree_node*, tree_node*, int, tree_node*) () #1 0x00000000108f4570 in tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) () #2 0x00000000108ff48c in tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) () #3 0x00000000108ffac8 in tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) () #4 0x00000000108ff574 in tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) () #5 0x00000000108ff528 in tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) () #6 0x000000001090ff88 in instantiate_decl(tree_node*, bool, bool) () #7 0x00000000108dd83c in instantiate_pending_templates(int) () #8 0x000000001087fb98 in c_parse_final_cleanups() () #9 0x00000000111f3bf8 in c_common_parse_file() () #10 0x00000000112e0978 in compile_file() () #11 0x000000001080dc34 in toplev::main(int, char**) () #12 0x00000000108103b4 in main ()
Martine, Honzo, this one will affect building FF 83+ everywhere.
So, as written in the upstream GCC bugreport, this is invalid C++ and should be fixed on the Firefox side (GCC11 has been already changed to reject it rather than to ICE on it). The change should be (pseudo patch): ErrorResult ExtractErrorResult(SpecialValueMappers... aSpecialValueMappers) { return mVariant.match( [](ErrorResult& aException) { return std::move(aException); }, - [aSpecialValueMappers...](const SpecialConstant<S>& aSpecialValue) { + [aSpecialValueMappers](const SpecialConstant<S>& aSpecialValue) { return ErrorResult{aSpecialValueMappers(aSpecialValue)}; }...); }
Thanks, I'll use a patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1671345.
This message is a reminder that Fedora 32 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '32'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 32 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 32 changed to end-of-life (EOL) status on 2021-05-25. Fedora 32 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.