Closed Bug 1507550 Opened 6 years ago Closed 6 years ago

Scrub out junk from Rust signatures in LSan white list

Categories

(Testing :: General, enhancement, P3)

Version 3
enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: mccr8, Assigned: jgraham)

References

Details

Attachments

(1 file)

If my patch in bug 1480799 works, the WPT LSan whitelists should have their Rust signatures all scrubbed of the weird junk that seems to change depending on the build or compiler, and the importing mechanism should be changed to also scrub it, so we don't add more. I don't know if those need to be separate bugs or not. A better fix would be to adjust the lsan-symbolizer to properly demangle Rust symbols, though that would also require regenerating these frames, in a different way. I'm not sure if that is easy or not. Here's an excerpt of lsan-allowed looks like [1] with some formatting: alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc::h5a1f0db41e296502, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc::h82bf91dcf8d89ced, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::alloc::hd3c140e687e2a935, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc::h3ab64a4bcafe2c39, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc::h5c6d61654badfe59, alloc_system::platform::_$LT$impl$u20$core..alloc..GlobalAlloc$u20$for$u20$alloc_system..System$GT$::realloc::hfdaa883bde7dcfa7, The idea is the various "h5a1f0db41e296502" stuff should be removed, and not introduced. Looking at the change log for this file, it seems like whatever changes in the compiler periodically, which introduces new leaks at import time, and then the new variant is added, which keeps us from leaking until whatever other compiler state happens. [1] testing/web-platform/meta/webauthn/__dir__.ini
James, do you have time to look at this in the next week? If not, I can try my hand at it.
Flags: needinfo?(james)
Priority: -- → P3
Flags: needinfo?(james)
Rust signatures aren't properly demangled, and contain some trailing data that seems to depend on the compiler version. This defeats the attempt to allow LSAN errors when importing tests, and we end up adding multiple variants of the same symbol to the allow list. To avoid this, simply preprocess the symbols not to contain the trailing junk when reading LSAN output, whilst we await better demangling.
Blocks: 1480799
Thanks for working on this.
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/6beca6ad237e Scrub out junk from rust signatures when processing LSAN data, r=mccr8 https://hg.mozilla.org/integration/mozilla-inbound/rev/4700d8714486 Fixup existing LSAN allowed rules to match new behaviour, a=testonly
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Assignee: nobody → james
No longer blocks: 1519676
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: