<br><br><div class="gmail_quote">On Tue, Jan 24, 2012 at 12:31 PM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Kostya,<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    As far as I can see the C and C++ standards are not relevant.  ASAN works on<br>
    LLVM IR, not on C or C++.  Lots of different languages have LLVM frontends.  I<br>
    personally turn Ada and Fortran into LLVM IR all the time for example.  Clearly<br>
    the C standard is not relevant to LLVM IR coming from such languages.  What<br>
    matters is how LLVM IR is defined.  As far as I know this construct is perfectly<br>
    valid in LLVM IR.<br>
<br>
<br>
Asan will not work for Fortran and Ada anyway (at least, out of the box).<br>
I am not even sure that anything like asan is needed for Ada (it has bounds<br>
checking built-in, the dynamic memory allocation is much more restrictive).<br>
The tool is rather specific to C/C++ (and ObjectiveC probably, although we have<br>
almost no tests for ObjectiveC, nor much knowledge in it).<br>
Yes, the IR transformations are done on the LLVM level, but the asan run-time<br>
library heavily depends on the C/C++ semantics and even implementation,<br>
and you can't really separate the asan instrumentation pass from the run-time.<br>
</blockquote>
<br></div>
it's pretty disappointing to hear that asan is basically just for C.</blockquote><div><br></div><div>If someone has use cases for other languages I'd like to hear about those. </div><div>In Fortran, asan is unlikely to be required because the language allows to implement bounds checking simpler</div>
<div>(not sure about use-after-free for dynamic memory in Fortran 95). Ditto for Ada, or e.g. Java. </div><div><br></div><div>--kcc </div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  But since<br>
it is, I won't bother you anymore about this attribute (though I still don't<br>
like it much).<br>
<br>
Ciao, Duncan.<br>
</blockquote></div><br>