|
From: Josef W. <Jos...@gm...> - 2005-08-04 15:22:29
|
On Thursday 04 August 2005 16:56, Nicholas Nethercote wrote: > On Thu, 4 Aug 2005, Josef Weidendorfer wrote: > > As callgrind wants the call graph of signal handlers in separate > > contexts, I track pre/post-signal hooks and do the call tracking > > accordingly. ... > > Is this some obscore VG bug, or is it expected that pre/post-signal hooks > > for VG tools are not called reliable (e.g. when a signal handler > > transfers control via longjmp) > > It's expected. include/pub_tool_tooliface.h says: > > /* Called after a signal is delivered. Nb: unfortunately, if the signal > handler longjmps, this won't be called. */ > void VG_(track_post_deliver_signal)(void(*f)(ThreadId tid, Int sigNo)); Oh. I should check for comments in the header files more often. It was new to me that you can exit a signal handler via longjmp. The fix was quite easy. After every BB, I try to synchronize my shadow call stack with the real %esp by unwinding as needed. Now in the unwinding, I check if I pass a signal handler border, and switch the context if needed. Thanks for the hint. Josef > > It's always been like this, I believe. > > I don't know if this is much help to you, though... > > N > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers |