|
From: Julian S. <js...@ac...> - 2009-02-06 14:20:37
|
On Friday 06 February 2009, Konstantin Serebryany wrote: > On Fri, Feb 6, 2009 at 4:45 PM, Tom Hughes <to...@co...> wrote: > > Konstantin Serebryany wrote: > >> Just checking: the mechanism used to get stack traces in exp-ptrcheck > >> will *not* be confused by such hand-written assembly, right? > > > > Of course it will. To start with we only have one piece of code for > > getting stack traces, and that is used everywhere. Plus if we had a magic > > way to get the stack trace in one place we'd use it in all the other > > places as well... > > exp-ptrcheck has it's own stack trace machinery. (right, Julian?) > It does not unwind the stack, instead it tracks each call/return > (roughly speaking). > ThreadSanitizer does the same. You're both right :-) exp-ptrcheck uses the same scheme as Callgrind has for years, to track call and return instructions and thereby create a shadow stack. I believe this will not be confused by missing CFI data since it does not use it. However, exp-ptrcheck also uses the "standard" stack unwinding to construct error messages, and so that will be confused, yes. J |