Created attachment 873423 [details] emerge --info When built wit mold linker (LDFLAGS="-fuse-ld=mold -Wl,-O2 -Wl,--as-needed"), firefox 119.0 build fine, but when executed it fails at start, from dmesg: firefox[30782]: segfault at 7f317aab0000 ip 00007f317aab0000 sp 00007ffc4ba76628 error 15 in libmozsqlite3.so[7f317aab0000+2f000] likely on CPU 5 (core 5, socket 0) This happens both on an Intel and on an AMD systems. Results of emerge --info are attached; firefox runs fine if '-fule-ld=mold' is removed from LDFLAGS. emerge -pqv firefox [ebuild R ] www-client/firefox-119.0 USE="X clang dbus gmp-autoupdate hwaccel jumbo-build libproxy lto openh264 pulseaudio system-av1 system-harfbuzz system-icu system-jpeg system-libevent system-libvpx system-webp -debug -eme-free -geckodriver -hardened -jack -pgo -screencast (-selinux) -sndio -system-png (-system-python-libs) -telemetry (-valgrind) -wayland -wifi" L10N="it -ach -af -an -ar -ast -az -be -bg -bn -br -bs -ca -ca-valencia -cak -cs -cy -da -de -dsb -el -en-CA -en-GB -eo -es-AR -es-CL -es-ES -es-MX -et -eu -fa -ff -fi -fr -fur -fy -ga -gd -gl -gn -gu -he -hi -hr -hsb -hu -hy -ia -id -is -ja -ka -kab -kk -km -kn -ko -lij -lt -lv -mk -mr -ms -my -nb -ne -nl -nn -oc -pa -pl -pt-BR -pt-PT -rm -ro -ru -sc -sco -si -sk -sl -son -sq -sr -sv -szl -ta -te -th -tl -tr -trs -uk -ur -uz -vi -xh -zh-CN -zh-TW"
Please grab a backtrace using gdb (https://wiki.gentoo.org/wiki/Debugging#Per-package). It would also be helpful if you could try older mold versions.
Created attachment 873432 [details] backtrace: firefox-119.0 + mold-2.3.1
Created attachment 873433 [details] backtrace: firefox-119.0 + mold-2.2.0
I hope the backtraces are OK, I'm not really a gdb user. I've followed the instructions from the link; gdb was used with the sequence "r", segfault, "bt" and then "q". The segfault, in dmesg, is error 15 in libmozsqlite3.so for both builds.
It's probably related to the new elf-hack. Mold may not be able to do it. Should probably be reported upstream as mold and --enable-elf-hack=relr being broken together. for now the ebuild should be patched to --disable-elf-hack if mold is detected.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cb1bf7319d22a2a4fb9c7c300f092154922f98b9 commit cb1bf7319d22a2a4fb9c7c300f092154922f98b9 Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2023-10-27 09:10:33 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2023-10-27 09:12:43 +0000 www-client/firefox: disable elf-hack again with mold linker (119.0) - the new relr-elfhack doesn't work with mold. Closes: https://bugs.gentoo.org/916259 Signed-off-by: Joonas Niilola <juippis@gentoo.org> www-client/firefox/firefox-119.0.ebuild | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
I think someone should regardless report this to mold upstream, as lld works fine.