Open ramosian-glider opened 9 years ago
LLVM r170869:
[asan] add a flag alloc_dealloc_mismatch (off by default for now) which finds malloc/delete,
new/free, new/delete[], etc mismatches
Reported by konstantin.s.serebryany
on 2012-12-21 08:55:44
FTR, I'll also need to add OS X interceptors in order for this to work.
Reported by ramosian.glider
on 2012-12-21 09:41:50
This feature is now enabled by default on Linux, but not on Mac.
Reported by konstantin.s.serebryany
on 2013-01-14 14:05:45
I've temporarily disabled the new/delete implementations on OSX
Reported by ramosian.glider
on 2013-01-22 11:39:23
Reported by glider@chromium.org
on 2013-01-28 15:19:54
Fixed as of r174628.
Reported by ramosian.glider
on 2013-02-07 16:03:26
Fixed
This is still broken. Citing myself from http://llvm.org/bugs/show_bug.cgi?id=15544:
"""
The current ASan implementation of custom new()/delete() does not work reliably
on Mac (it may occasionally, but that's fake safety). Because the ASan runtime
library is a DSO, we end up having the main executable depend on two DSOs
(libstdc++ and libclang_rt.asan_osx_dynamic) each having their own new/delete
implementation. It's not determined which of them is picked at startup (I saw
both versions already).
Until we decide how to make ASan reliably intercept new/delete on OS X we just
need to disable our custom interceptors - that should fix the new_handler
issue.
"""
I've disabled alloc_dealloc_mismatch and the corresponding tests on OS X for now.
Reported by ramosian.glider
on 2013-04-23 12:16:26
Accepted
A crazy idea follows.
What if we add a weak undefined symbol to asan runtime that can be resolved by libstdc++?
This way asan runtime will depend on libstdc++ (if it is linked to the executable at
all). This will force the lookup order.
Reported by eugenis@chromium.org
on 2013-04-23 12:28:17
Forget it, won't work.
Reported by eugenis@google.com
on 2013-04-23 12:47:32
Reported by ramosian.glider
on 2015-07-30 09:05:31
Adding Project:AddressSanitizer as part of GitHub migration.
Reported by ramosian.glider
on 2015-07-30 09:06:55
Originally reported on Google Code with ID 131
Reported by
konstantin.s.serebryany
on 2012-12-03 12:06:12