Closed Bug 1419607 Opened 2 years ago Closed 2 years ago

Adding additional flags to build/unix/mozconfig.asan

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox59 fixed)

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: tsmith, Assigned: tjr)

References

Details

(Whiteboard: [tor 21925])

Attachments

(1 file)

I would like to suggest the addition of two build flags to the ASan builds, "-U_FORTIFY_SOURCE" and "-fno-common".

The intention here is to prevent missing bugs that could otherwise go unnoticed. "-D_FORTIFY_SOURCE=2" is used by default on some Linux distribution.

These flags stood out while reviewing the sanitizers FAQs page[1]. Any feedback would be appreciated.

[1] https://github.com/google/sanitizers/wiki/AddressSanitizer#faq
I unstuck Bug 1418052 which sets -U_FORTIFY_SOURCE for ASAN (and stops setting -D_FORTIFY_SOURCE=2 which I added by accident)

To resolve this bug my intention is to make --disable-hardening set -fno-common
Comment on attachment 8942465 [details]
Bug 1419607 Specify -fno-common for ASAN builds

https://reviewboard.mozilla.org/r/212760/#review218666
Attachment #8942465 - Flags: review?(twsmith) → review+
Comment on attachment 8942465 [details]
Bug 1419607 Specify -fno-common for ASAN builds

https://reviewboard.mozilla.org/r/212760/#review218676

Please add a comment explaining why.
Attachment #8942465 - Flags: review?(mh+mozilla) → review+
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6803a23209cd
Specify -fno-common for ASAN builds r=glandium,tsmith
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6803a23209cd
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Whiteboard: [tor 21925]
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.