[llvm-commits] Specification for Run-time Checks

Alexander Potapenko glider at google.com
Fri May 11 01:47:08 PDT 2012


John,

What if one needs to ensure that his load or store is within an object
of unknown size (think polymorphism)?
Will such a situation be emulated with a fastgepcheck(src, dest, base, 0)?
(BTW what is |base| and isn't it the same as |src|?)

I also think that it may be useful to pass an additional argument that
defines the pool being used to pool_[un]register_heap.
On some systems several allocators may be present in the program, and
it might be a good idea to distinguish between them.


Alex

On Thu, May 10, 2012 at 1:47 AM, John Criswell <criswell at illinois.edu> wrote:
> Dear Nuno and All,
>
> Attached is my first draft of a specification for the run-time checks I
> would like to propose to replace the use of objectsize for dynamic bounds
> checking.  It includes a brief description of the checks and examples of how
> Clang, ASan, and SAFECode could use them.
>
> This is a first rough draft.  Questions, comments, criticisms are welcome.
>  If people are sufficiently interested, I can make revisions based on
> comments
>
> For the curious, implementing the functionality that Nuno wants (described
> in Section 3.1) would be trivial.  I would need to update two small passes
> in SAFECode from LLVM 3.0 to LLVM mainline, write a Clang-specific pass that
> removes calls to gepcheck, and copy the implementation of fastgepcheck into
> the correct run-time library (compiler-rt?).  With additional work, I could
> write a new pass that inlines the fastgepcheck so that libLTO isn't needed
> to inline the fastgepcheck implementation, but that might take a little more
> time.
>
> -- John T.
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Alexander Potapenko
Software Engineer
Google Moscow




More information about the llvm-commits mailing list