gopalshankar / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

Detect stack overflow in SEGV handler #262

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With sigaltstack we can more or less reliably detect stack overflow condition 
by comparing access address to SP and to (known) stack limits.

On the main thread stack limits may be off, but still, any access near SP (+-1 
page) must be a stack overflow.

Original issue reported on code.google.com by euge...@google.com on 6 Feb 2014 at 5:41

GoogleCodeExporter commented 9 years ago
Can we have this functionality in every tool?
We already have callbacks that install deadly signal handlers, and I was going 
to implement those in TSan and MSan. But perhaps it's better to just have a 
single SEGV handler to rule them all? We don't seem to need any tool-specific 
code in it.

Original comment by ramosian.glider@gmail.com on 7 Feb 2014 at 1:13

GoogleCodeExporter commented 9 years ago
Is this done? 

Original comment by konstant...@gmail.com on 7 May 2014 at 8:46

GoogleCodeExporter commented 9 years ago
Only in ASan.
Looks like TSan and MSan don't setup SEGV handlers at all.

Original comment by euge...@google.com on 7 May 2014 at 9:10