Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1886303 - ICE with segfault when compiling Firefox trunk
Summary: ICE with segfault when compiling Firefox trunk
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 32
Hardware: All
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker PPCTracker
TreeView+ depends on / blocked
 
Reported: 2020-10-08 07:06 UTC by Dan Horák
Modified: 2021-05-25 16:51 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-25 16:51:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
preprocessed source (1.94 MB, application/gzip)
2020-10-08 07:06 UTC, Dan Horák
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 97358 0 P2 ASSIGNED [8/9/10 Regression] ICE while building firefox since r8-2720 2021-01-05 20:42:17 UTC

Description Dan Horák 2020-10-08 07:06:22 UTC
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)

Comment 1 Dan Horák 2020-10-08 14:36:28 UTC
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 ()

Comment 2 Dan Horák 2020-10-12 07:31:36 UTC
Martine, Honzo, this one will affect building FF 83+ everywhere.

Comment 3 Jakub Jelinek 2020-10-14 20:19:21 UTC
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)};
         }...);
   }

Comment 4 Martin Stransky 2020-10-15 15:36:02 UTC
Thanks, I'll use a patch from https://bugzilla.mozilla.org/show_bug.cgi?id=1671345.

Comment 5 Fedora Program Management 2021-04-29 16:40:16 UTC
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.

Comment 6 Ben Cotton 2021-05-25 16:51:04 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.