[cfe-dev] stack overflow detection?

John Criswell criswell at illinois.edu
Tue Sep 17 15:20:38 PDT 2013


On 9/17/13 5:18 PM, Greg Fitzgerald wrote:
> Thanks for the quick replies!
>
>
>> If you want dynamic detection, then Address Sanitizer (which is built into Clang) or SAFECode
> Dynamic detection.  I tried with Address Sanitizer and no luck
> out-of-the-box.  I think it can detect stack-buffer-overflow (aka
> stack corruption), but not stack overflow.  I also tried running the
> code with ASan inside a pthread with heap-allocated memory for its
> stack, but since the pthread library itself is not instrumented, it
> did not detect the heap-buffer-overflow when the thread's stack
> overflows.

I think I misunderstood.  Are you asking about the case in which the 
stack is about to exceed the limit set by the operating system?  I 
assumed you were talking about stack buffer overflows.

-- John T.




More information about the cfe-dev mailing list