Closed Bug 990266 Opened 9 years ago Closed 9 years ago

ASan: xpcshell self-test does not symbolize on failure


(Testing :: XPCShell Harness, defect)

Not set


(Not tracked)



(Reporter: decoder, Assigned: ted)


(Blocks 1 open bug)



(1 file)

In we support symbolizing with the llvm-symbolizer by looking for the symbolizer binary in the xrePath. This works on the test slaves where XPCShell tests run. However, make check also runs an xpcshell self-test on the builder and that self-test also uses the logic from Therefore we need to support both binary paths (builder and tester) in that harness.
You can just grab the path using the Python buildconfig modules in the selftest script:

It only ever runs on build machines in make check.
So I scanned through the code a bit and what I could do in is:

> xrePath = os.path.join(objdir, "dist", "bin")
> xpcshellBin = os.path.join(xrePath, "xpcshell")

and then pass xrePath to the runTests call that goes to

However, that function uses mozInfo to determine if we're in an ASan build:

>        if "asan" in self.mozInfo and self.mozInfo["asan"]:
>            # ASan symbolizer support
>            llvmsym = os.path.join(self.xrePath, "llvm-symbolizer")
> ...

and is explicitely passing mozInfo={}.
Flags: needinfo?(ted)
Ah, okay, I unwrapped this a little in my head. I think the biggest issue here is that just wasn't written with the expectation that it would have to deal with crashes and things like this, since it's running dead-simple tests. Sadly this isn't crashing on the test machines, so we need to fix it.

It sounds like the simple fix is just to pass mozinfo in properly in I'll get a patch together for that.
Assignee: choller → ted
Flags: needinfo?(ted)
This passes the selftests for me locally, and nothing else in the selftests actually depends on mozinfo, so it should be pretty safe. (We don't do any test filtering in the manifests, for example.)
Attachment #8400160 - Flags: review?(jmaher)
Comment on attachment 8400160 [details] [diff] [review]
use mozinfo in xpcshell selftests

Review of attachment 8400160 [details] [diff] [review]:

this looks safe and reasonable.
Attachment #8400160 - Flags: review?(jmaher) → review+
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.