[cfe-dev] Memory sanitizer for OSX
Kostya Serebryany via cfe-dev
cfe-dev at lists.llvm.org
Tue Apr 11 10:24:11 PDT 2017
Hi Halfdan,
On Mon, Apr 10, 2017 at 4:22 PM, Halfdan Ingvarsson via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> Hello
>
> What is the feasibility of getting -fsanitizer=memory to work on OSX?
>
If you want to make it work on small self-contained tests, it should be a
matter of enabling the msan flags for OSX and maybe tweaking the constants
for the shadow memory location.
For anything real, it's almost impossible w/o assistance from Apple (CC-ed
two Apple folks)
Unlike asan/tsan/ubsan, msan must see all memory accesses (at least, all
writes) in the process, otherwise there will be tons of false positives.
This means that all libraries linked to the binary need to be instrumented
with msan.
(On Linux the only exception is glibc, for which msan caries a ton of
interceptors)
--kcc
>
> I'd be more than happy to look into doing the work and providing a patch,
> provided that it's actually doable in the first place. Who would be the
> best person to speak to about this?
>
> All the best,
>
> - ½
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170411/25d42b6c/attachment.html>
More information about the cfe-dev
mailing list