|
From: Jeremy F. <je...@go...> - 2005-06-01 22:07:34
|
Josef Weidendorfer wrote:
>Now I have a bug report with an assertion because my data structures are
>getting corrupted. Looking at it, I see that there is an signal handler
>switching thread via SK_(pre_deliver_signal)(ThreadId tid, ...), and on
>returning, the previous running thread seems to be resumed, but I do not get
>any callback (e.g. via thread_run) that there is a thread context switch
>after the signal handler.
>
>
Yep, that looks like a bug. There should be a call to
VG_(tm_thread_switchto)(tid); in vg_async_signalhandler(), though
perhaps VG_(set_running)() should always call it.
>Or accessing all per-thread data always via indirection, calling
>VG_(get_current_or_recent_tid)() everytime. I assume this will give some
>performance hit.
>
>
That will work, and its how other tools keep track of per-thread info.
It isn't particularly slow, so I would try it and see.
J
|