<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF" text="#000000">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.</div></blockquote><div><br></div><div>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. </div>
<div>The old objects are replaced with GEPs inside the new object.</div><div>For each such new object (stack frame) asan creates a constant string that describes the object names and offsets.</div><div>When a stack-buffer-overflow is detected, asan run-time parses that string and prints a message like this: </div>
<div><pre class="prettyprint" style="font-size:13px;padding:0.5em;overflow:auto;font-family:Monaco,'DejaVu Sans Mono','Bitstream Vera Sans Mono','Lucida Console',monospace;max-width:70em;background-color:rgb(238,238,238)">
<span class="typ" style="color:rgb(102,0,102)">Address</span><span class="pln"> </span><span class="lit" style="color:rgb(0,102,102)">0x7f5620d981b4</span><span class="pln"> </span><span class="kwd" style="color:rgb(0,0,136)">is</span><span class="pln"> located at offset </span><span class="lit" style="color:rgb(0,102,102)">436</span><span class="pln"> </span><span class="kwd" style="color:rgb(0,0,136)">in</span><span class="pln"> frame </span><span class="str" style="color:rgb(0,136,0)"><main></span><span class="pln"> of T0</span><span class="str" style="color:rgb(0,136,0)">'s stack:<br>
This frame has 1 object(s):<br> [32, 432) '</span><span class="pln">stack_array</span><span class="str" style="color:rgb(0,136,0)">'</span></pre></div><div><br></div><div> --kcc </div></div>