Closed Bug 1246801 Opened 5 years ago Closed 5 years ago

Leak Sanitizer (LSan) support for NSS

Categories

(NSS :: Build, defect, P2)

defect

Tracking

(firefox47 affected)

RESOLVED FIXED
Tracking Status
firefox47 --- affected

People

(Reporter: jld, Assigned: ttaubert)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(5 files)

Bug 1233568 will enable Address Sanitizer support for NSS, for detecting use-after-free and buffer-overrun bugs and such, but disables the accompanying memory leak checker.  Enabling it will require going through the leaks reported in the test suite, deciding which ones are real bugs that need to be fixed, and either fixing them or (if not simple to fix) filing bugs and adding suppressions pending a fix, as well as suppressing any considered to be false positives.
Some of this work has already been done — tests/memleak/ignored should at least be a starting point for a suppression list for LSan.  Firefox also has an LSan suppression file, but it doesn't have much from NSS or NSPR.
local_suppressor.py from https://github.com/amccreight/mochitest-logs is useful when trying to build up a suppression list to cover a particular run. It attempts to simulate which leaking stacks would be suppressed with a given suppression file.
Priority: -- → P2
Blocks: tls13
Duplicate of this bug: 1281707
Depends on: 1281724
Depends on: 1282069
Assignee: nobody → ttaubert
Status: NEW → ASSIGNED
http://clang.llvm.org/docs/AddressSanitizer.html proposes to disable tail call elimination for better stack traces.
Attachment #8765417 - Flags: review?(franziskuskiefer)
This patch adds NSS_ENABLE_LSAN, a runtime flag that allows to leave LSan enabled. We need it to switch on LSan for selected builds/tests until all leaks are fixed.
Attachment #8765423 - Flags: review?(franziskuskiefer)
This would use the new NSS_ENABLE_LSAN flag and create a new "lsan" row on TreeHerder, until we can merge ASan and ASan/LSan back together. For a start, we get a build and a cert.sh run with that.
Attachment #8765434 - Flags: review?(franziskuskiefer)
Attachment #8765417 - Flags: review?(franziskuskiefer) → review+
Attachment #8765434 - Flags: review?(franziskuskiefer) → review+
Attachment #8765423 - Flags: review?(franziskuskiefer) → review+
Depends on: 1282731
Attachment #8765417 - Flags: checked-in+
Attachment #8765423 - Flags: checked-in+
Attachment #8765434 - Flags: checked-in+
Attachment #8765819 - Flags: review?(franziskuskiefer) → review+
Attachment #8765841 - Flags: review?(franziskuskiefer) → review+
Depends on: 1283016
Depends on: 1283037
Depends on: 1283040
Blocks: LSan
Set NSS_DISABLE_UNLOAD=1 for LSan runs:

https://hg.mozilla.org/projects/nss/rev/9e0b4530a2ea
Use docker image v0.0.17, use clang-3.8 for ASan/LSan runs:

https://hg.mozilla.org/projects/nss/rev/b2730e41497e
Depends on: 1283380
Depends on: 1283404
Depends on: 1284272
Depends on: 1284317
Depends on: 1284828
Depends on: 1284831
Depends on: 1284832
Depends on: 1285145
Depends on: 1287280
Depends on: 1303450
Depends on: 1306947
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Removing leave-open keyword from resolved bugs, per :sylvestre.
Keywords: leave-open
You need to log in before you can comment on or make changes to this bug.