Bugs 47633, 47649

Paul Gofman gofmanp at gmail.com
Tue Aug 20 07:28:55 CDT 2019


Latest commits brought some extra DECLSPEC_HOTPATCH attributes to a few
kernelbase.dll (former kernel32.dll) functions, which have triggered gcc
bug (see [1], [2]). The bug is not triggered when -fPIC is used, or if
optimization is disabled. It looks like the bug is triggered mostly in
the stub functions which have just WARN or FIXME, those functions which
have some other code inside look ok (though I did not check them all). I
know that tweaks which workaround compiler issues are not welcome in
Wine. But in the present case it is likely going to be a massive
regression, as the problem affects, e. g., native .Net (at least 4.0 for
me) which is crashing after the second call to
SetThreadStackGuarantee(), and likely much more. This is probably going
to be long standing issue, as even after the bug is fixed upstream the
fix is yet to come to mingw-w64 gcc versions used in Wine builds across
distributions. In the view of that, maybe it worth considering some
temporary solution? E. g., adding __attribute__((optimize(0))) to
DECLSPEC_HOTPATCH can workaround the problem.

1. https://bugs.winehq.org/show_bug.cgi?id=47633#c4

2. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91489






More information about the wine-devel mailing list