Firefox breaks when using GCC and -O3
Categories
(Firefox Build System :: General, defect, P5)
Tracking
(Not tracked)
People
(Reporter: whissi, Unassigned)
Details
Attachments
(1 file)
105.48 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
Steps to reproduce:
Build firefox with GCC and -O3.
Actual results:
Try running userscript addon which will fail like shown in attached screenshot.
Try using web.whatsapp.org: Login and refresh page, it will stop working when firefox was built using -O3.
Go to https://opinov8.com -- after reload, no images is loaded and JS is garbage/doesn't work.
Expected results:
Everything works when firefox was built using -O2. Using CLANG instead of GCC and -O3 works, too.
I believe it's limited to GCC 10?
https://bugs.gentoo.org/758446
https://github.com/InBetweenNames/gentooLTO/issues/650
Comment 2•5 years ago
|
||
I'm not sure about the accurate component for this issue.
I will assign "Firefox Build System: General" maybe it could be a good starting point.
Thanks.
Comment 3•4 years ago
|
||
This is likely a GCC bug, which we wouldn't be able to do much about. Honza, what do you think?
Reporter | ||
Comment 4•4 years ago
|
||
JFYI: I understand that there is probably not much which can be done from Mozilla's POV. The purpose of this bug is to get some help finding the problematic code to get this reported to GCC upstream. We will post an update to this bug soon, a Gentoo user did some tests in the meanwhile and was able to reproduce this problem with vanilla GCC >=10 (so this is a regression, GCC 9 works and still not fixed in upcoming GCC 11 version).
Reporter | ||
Comment 5•4 years ago
|
||
Loop vectorization, -ftree-loop-vectorize, which will be auto-enabled when using -O3, is the trigger. It's broken in GCC 10+.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
After a chat with glandium and Connor, I'm going to unassign this bug.
This problem can only be triggered if GCC flags are manually modified to add -O3
. If Firefox defaults are being overridden already, then it is understandable that bugs related to these manually-defined flags will have to be manually worked around.
TL;DR: if someone downstream is running into this, disable the tree-loop-vectorize
flag, as discovered by Thomas (thanks Thomas!)
While I agree non default build flags aren't exactly a supported configuration, I suspect if auto vectorization was broken as a whole on gcc 10 there'd be much more noise about it. Has anyone ruled out that the auto vectorization is just triggering an indexing bug more reliably via the vectorized load?
Updated•2 years ago
|
Shouldn't this bit be given a higher priority given that O2 in GCC 12 enables autovectorization?
Description
•