[Gc] Re: WOW64 bug: GetThreadContext() may return stale contents

Zach Saw zach.saw at gmail.com
Sat Nov 20 23:24:49 PST 2010


> Probably yes (as ESP of the suspended threads is used to get the stack bounds).
> Is any workaround suggested for this?

No - there won't be a workaround. Its a design oversight by MSFT in their WOW64
which dates back to XP-64. The design (having translation in user mode)
conflicts with kernel APC which SuspendThread uses to halt the execution of a
thread. To truly fix it, WOW64 would need to be moved to kernel mode. Now that
it's been in the wild for about 10 years, they can't do that in fear that apps
that rely on undocumented features would break (although they have no idea if
such apps even exist).

MSFT may not fix the bug as they feel the use of Boehm GC (and other apps that
rely on this method) is limited.



More information about the Gc mailing list