Open Bug 1182378 Opened 5 years ago Updated 2 years ago

Building with ASan on Mac: Undefined symbol "___lsan_ignore_object"


(Core :: MFBT, defect, blocker)

Not set



Tracking Status
firefox42 --- affected


(Reporter: jruderman, Unassigned)


(Blocks 1 open bug)



(2 files)

Attached file build log
* Mac
* mozilla-central rev 2c91d57441fd (trunk from today)
* LLVM rev r241643 (trunk from yesterday)
* mozconfig with "-fsanitize=address" in {CC,CXX} as well as {CFLAGS,CXXFLAGS,LDFLAGS} to work around an NSS build issue

> Undefined symbols for architecture x86_64:
>   "___lsan_ignore_object", referenced from:
>       mozilla::nsTerminator::StartWriter() in nsTerminator.o
>       mozilla::(anonymous namespace)::RunWriter(void*) in nsTerminator.o
>       mozilla::nsTerminator::Observe(nsISupports*, char const*, char16_t const*) in nsTerminator.o
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)

The macro that calls __lsan_ignore_object was added in bug 1075134.
Attached file mozconfig-asan
If I work around this by making MOZ_LSAN_INTENTIONALLY_LEAK_OBJECT a no-op, my build succeeds. Somehow the __asan_* symbols are linking fine and only the __lsan_* symbol is having trouble.
I just pulled the latest compiler-rt, and __lsan_ignore_object seems still present in compiler-rt//lib/lsan/ It doesn't seem #ifdefed away.
You need to log in before you can comment on or make changes to this bug.