Enable ASan in Rust code
Categories
(Firefox Build System :: General, task, P3)
Tracking
(firefox86 fixed)
| Tracking | Status | |
|---|---|---|
| firefox86 | --- | fixed |
People
(Reporter: away, Assigned: away)
References
Details
(Keywords: in-triage)
Attachments
(1 file)
As far as I can tell, we don't currently sanitize Rust code in our ASan builds. Maybe we should, because of unsafe code.
Welp, attempting this on Windows didn't get very far:
error: AddressSanitizer only works with the `x86_64-unknown-linux-gnu` or `x86_64-apple-darwin` target
Updated•6 years ago
|
This patch enables ASan for rust code in the linux64-asan/{debug,opt} build tasks. Since it is a -Z unstable flag, we'll move to the same linux64-rust-nightly toolchain that TSan builds use.
For the time being, the ASan Nightly Reporter builds are left alone, until we're more familiar with the perf impacts of this landing.
Updated•4 years ago
|
Comment 5•4 years ago
|
||
| bugherder | ||
I ran StyleBench, on the assumption that it should spend a relatively large amount of its time in Rust code.
linux64-opt: 69.3
linux64-asan (before -- C++ only): 23.2
linux64-asan (after -- C++ and Rust): 20.9
So there's some cost but not nearly as much as base ASan. What do you think?
For comparison here's Speedometer which is less sensitive to Rust:
linux64-opt: 69.7
linux64-asan (before -- C++ only): 26.5
linux64-asan (after -- C++ and Rust): 26.0
Comment 8•4 years ago
|
||
I think that's fine. I also checked for some Mochitests before and after your push and the funny thing is: All of the test chunks I checked are consistently faster with your push (by 2-3 minutes). So either your push unexpectedly improved performance or the test noise here is a lot larger than the perf impact. Maybe the switch to Rust nightly somehow overall caused a slight performance improvement that isn't visible in the StyleBench?
In any case, I think we're good here.
Description
•