[LLVMdev] LLVM-based address sanity checker
Renato Golin
rengolin at systemcall.org
Fri Jun 17 01:04:35 PDT 2011
On 17 June 2011 08:55, Kostya Serebryany <kcc at google.com> wrote:
> I am rather reluctant to add 'generic' code that handles unknown/untested
> platforms because the memory mapping is very platform specific anyway.
Indeed, but the point of that is more for helping writing
platform-specific versions than actually using it as a general-purpose
routine. Kinda documentation of your intentions on C, which is better
than ASM.
If you're lucky, it might even work... ;)
> For extreme performance ASAN uses the fixed memory-to-shadow mapping
> (addr>>3)+offset. I guess there are plenty of platforms where this mapping
> won't work or will require different offset.
I got a bit confused there, TBH. How do you guarantee that that part
of memory will be allocated? If I'm not mistaken, the Native Client
guys have done a memory place-holder, with enough space pre- and
post-code, is it similar of what you're doing? Or are you using a big
BSS region?
Depending on how you did it, it might just work on other platforms...
cheers,
--renato
More information about the llvm-dev
mailing list