[llvm-commits] AddressSanitizer, first patch

Kostya Serebryany kcc at google.com
Thu Sep 8 17:48:00 PDT 2011


>
> Some somewhat trivial issues:
>
> a) Please go ahead and hide the non-user visible flags.
>

How? (sorry for ignorance)


>
> b) Not a big fan of this style of avoid 80-col wrap:
>
> +Instruction *AddressSanitizer::generateCrashCode(
> +    IRBuilder<> &IRB, Value *Addr, int TelltaleValue) {
>

Hmmm. This is in the coding style, isn't it??


>
> c) +  // which will be lowered to a cusom assembly.
>
> s/cusom/custom
>

fixed.


>
> d)
>
> +  if (TypeSize != 8 && TypeSize != 16 &&
> +      TypeSize != 32 && TypeSize != 64 && TypeSize != 128) {
> +    // TODO(kcc): do something better.
> +    return;
> +  }
>
> What's the reason behind this?
>

We may have a load of some different size, can't we?
E.g. size==1 will indicate that we are actually loading something like a bit
field.



>
> Perhaps not so trivial:
>
> a) Where are the asan_* functions? Where are they supposed to live?
>

There is the whole run-time library, which was described in my initial post
3 months ago.
http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-June/040800.html
The code resides in
http://code.google.com/p/address-sanitizer/source/browse/#svn%2Ftrunk%2Fasan
I'd be willing to contribute this code to LLVM as well, but it'll have to be
a separate thing.
--kcc



>
> I'll probably have more, but it's a start and the discussion on the library
> functions probably should happen sooner rather than later.
>
> -eric
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110908/6a98ffb8/attachment.html>


More information about the llvm-commits mailing list