Memory sanitizer for OSX

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Memory sanitizer for OSX

Richard Pennington via cfe-dev
Hello

What is the feasibility of getting -fsanitizer=memory to work on OSX? 

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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Memory sanitizer for OSX

Richard Pennington via cfe-dev
Hi Halfdan, 

On Mon, Apr 10, 2017 at 4:22 PM, Halfdan Ingvarsson via cfe-dev <[hidden email]> 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
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev



_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Loading...