[llvm-commits] Specification for Run-time Checks

Kostya Serebryany kcc at google.com
Fri May 11 00:49:56 PDT 2012


>
> What does your instrumentation with the frame description string look
> like?  If I understood that better, I could better tell you whether ASan
> should modify the pool_register_stack calls or whether it should just use
> its own instrumentation pass for that step.
>

Given N stack objects (Alloca insns) asan creates a single new alloca
objects with enough space  to contain the original N objects and N+1
redzones.
The old objects are replaced with GEPs inside the new object.
For each such new object (stack frame) asan creates a constant string that
describes the object names and offsets.
When a stack-buffer-overflow is detected, asan run-time parses that string
and prints a message like this:

Address 0x7f5620d981b4 is located at offset 436 in frame <main> of T0's stack:
  This frame has 1 object(s):
    [32, 432) 'stack_array'


 --kcc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120511/44b67e4f/attachment.html>


More information about the llvm-commits mailing list