https://bugs.winehq.org/show_bug.cgi?id=32515
--- Comment #84 from Christian Inci chris.wine@broke-the-inter.net ---
What the heck? I'm not that sure anymore. Where did the comment about the debug registers came from? Did they tested it too? I only sent my test results to Julliard, which were the same (except with 2.6.28). (I've tested it with Linux 2.6.28, 4.10.x, MacOS 10.10, 10.12, FreeBSD 11)
Julliard wrote to me, that the set_thread_context call will slow down thread creation. I guess that it's preferred to fix it at the kernel instead of calling that function everytime and the cached values shouldn't be inherited if the actual values won't be either. Calling this function isn't required for this specific bug, as Valve's CEG will only check the cached debug registers instead of the actual values/registers for some reason, but it's there for consistency. I don't know if it's the correct behaviour to clear the debug registers or if it's even specified to do it, but only Microsoft and Apple are doing it (maybe even correctly) and I hate them for that.
Anyway, many thanks to the staging team for merging, cleaning and fixing up my patches.