make LSan work with xpcshell ASan testing



XPCShell Harness
2 years ago
2 years ago


(Reporter: froydnj, Unassigned)


Firefox Tracking Flags

(Not tracked)



(3 attachments)

Trying to run ASan on xpcshell tests with a version of ASan that turns LSan on results in much sadness.  I have some patches to fix this, but they're not complete, and there are other issues with ASan xpcshell anyway.  Opening this bug to provide a convenient place to dump those patches.
Created attachment 8661868 [details] [diff] [review]
part 1 - install lsan_suppressions.txt for xpcshell tests

ASan testing that also uses LSan requires these suppressions to produce
anything useful.  We already use the suppressions file for mochitests,
so there's no harm in using the same file for xpcshell tests.  Future
patches will wire up the xpcshell harness to use this file.
Created attachment 8661869 [details] [diff] [review]
part 2 - propagate knowledge about the xpcshell test directory from

For suppressing LSan-detected leaks, we need to know the path to the
suppression file.  An earlier patch in this series installed the
suppression file into the _tests/xpcshell/ directory. already knows how outside clients can tell it about
the location of its test directory(s).  (This is how no-manifest tests
work.)  Let's wire |mach xpcshell-test| up so it can pass in the
appropriate path to the main test runner.  mach-invoked (desktop)
xpcshell tests already use manifests to run tests, so this test
directory facility goes unused, and won't affect anything else.
Created attachment 8661870 [details] [diff] [review]
part 3 - add LSan options when using ASan in xpcshell tests
(In reply to Nathan Froyd [:froydnj] from comment #3)
> Created attachment 8661870 [details] [diff] [review]
> part 3 - add LSan options when using ASan in xpcshell tests

This probably needs to set things like MOZ_CC_RUN_DURING_SHUTDOWN.
Depends on: 1205348
You need to log in before you can comment on or make changes to this bug.