+Ott Tinn<div><br></div><div>Some comments, mostly related to asan: </div><div><br></div><div>>> lscheck (void * ptr, int length)</div><div>length should be size_t</div><div>asan needs to distinguish between reads and writes. </div>
<div><br></div><div>>> pool register stack(void * p, int size)</div><div>asan needs more information for the stack than just pointer and size. Currently, there is a extra constant string with frame description.</div>
<div>Asan modifies the whole stack frame at once, not every single alloca separately.</div><div>size must be size_t </div><div><br></div><div>>> pool register global(void * p, int size):</div><div>This is very slow for cases when we have millions of globals. </div>
<div>asan uses a callback which takes an array of globals as a parameter. </div><div>Also, asan modifies the global (adding a redzone at right). </div><div>size must be size_t </div><div><br></div><div>>> pool unregister(void * p):</div>
<div>For performance, we will need separate unregister calls for heap, stack and globals. </div><div><br></div><div><br></div><div>>> The Address Sanitizer (ASan)</div><div>s/Address Sanitizer/AddressSanitizer/ (no spaces) :)</div>
<div><br></div><div>>> convert lscheck checks to fastlscheck</div><div>For asan this is useless (though harmless)</div><div><br></div><div>>> or remove checks that will always pass at run-time</div><div>Yes, please!!! :) </div>
<div><br></div><div><br></div><div>--kcc </div><div><br></div><div><br><br><div class="gmail_quote">On Thu, May 10, 2012 at 2:33 AM, John Criswell <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 5/9/12 4:47 PM, John Criswell wrote:<br>
> Dear Nuno and All,<br>
><br>
> Attached is my first draft of a specification for the run-time checks<br>
> I would like to propose to replace the use of objectsize for dynamic<br>
> bounds checking.  It includes a brief description of the checks and<br>
> examples of how Clang, ASan, and SAFECode could use them.<br>
><br>
> This is a first rough draft.  Questions, comments, criticisms are<br>
> welcome.  If people are sufficiently interested, I can make revisions<br>
> based on comments<br>
><br>
> For the curious, implementing the functionality that Nuno wants<br>
> (described in Section 3.1) would be trivial.  I would need to update<br>
> two small passes in SAFECode from LLVM 3.0 to LLVM mainline, write a<br>
> Clang-specific pass that removes calls to gepcheck, and copy the<br>
> implementation of fastgepcheck into the correct run-time library<br>
> (compiler-rt?).  With additional work, I could write a new pass that<br>
> inlines the fastgepcheck so that libLTO isn't needed to inline the<br>
> fastgepcheck implementation, but that might take a little more time.<br>
<br>
</div></div>Also, just to be clear, I'd be more than happy to do the implementation<br>
work and submit patches for review if people want to use this approach.<br>
<br>
-- John T.<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>