|
From: Bart V. A. <bva...@ac...> - 2014-06-09 13:42:15
|
On 06/09/14 13:16, Olivier Goffart wrote: > On Monday 09 June 2014 09:53:37 Bart Van Assche wrote: >> If g++ would be modified such that the "if (!guard.first_byte)" test can >> be skipped at run-time then it would become possible for Helgrind and >> DRD to recognize static initialization by intercepting the >> __cxa_guard_*() functions. However, I'm not sure which mechanism the gcc >> maintainers will prefer for disabling that if-test at run-time. > > Just an idea: Is it not possible to record guard's address on > __cxa_guard_release, and then consider that an access to guard as an happens > after? > I don't know the internals of helgrind, so I can't say if it is possible, or > if it would be too slow. > Or is __cxa_guard_* used for more than the static initialization? This is certainly possible but I don't see how to implement this without slowing down Helgrind and DRD significantly. Bart. |