Alexandre Julliard skrev:
Ove Kaaven ovek@arcticnet.no writes:
Francois Gouget skrev:
Does anyone know if MSVC does a cld in the right places?
Maybe. But it hardly matters. Only GCC-generated code is affected. The problem might then show up in Wine signal/exception handling. Things like, say, copying the CONTEXT structures around, for example.
It matters in the sense that Wine currently doesn't clear the direction flag before calling an exception handler, so if MSVC doesn't do a cld then we'd have the same bug WRT msvc as the Linux kernel has WRT gcc.
But that's a bit of a different issue, unrelated to the kernel flaw. I was only talking about that flaw. I kind of tried to clarify that in my next followup... oh well.
When it comes to ABI issues with MSVC code, the question isn't so much whether it uses cld, but what Windows does when throwing exceptions. Does Windows clear the DF when it calls exception handlers? If not, then there's hardly any Wine bug here (that doesn't exist on Windows anyway). Perhaps someone should test, but my guess is that Windows doesn't clear it.
(And anyway, my experience is that MSVC assumes DF is undefined, and does the cld.)
Of course now that gcc is changed we'll have to make sure to clear the flag regardless of what MSVC does.
But not just in the exception handling. Everywhere... there's no special case here.