Dear all,
I compiled Wine with icc and found 2 issues, which I managed to fix in the code. The issues are:
1. Crash in Wine loader (at least with using Intel compiler) Checking return values from all the calls to wld_mprotect in loader/preloader.c solved the issue (apparently syscall was optimized out when return value was not used, which is likely a compiler problem)
2. msvcrt/math.c has a number of trigonometrical functions implementations named __libm_sse2_... (e. g., __libm_sse2_cos). icc substitutes these names for some of trigonometrical functions (e. g., tan is replaced internally by __libm_sse2_tan). This results in endless recursion and stack overflow both in __lib_sse2_tan and the ordinary tan function in msvcrt (which is get aliased to __libm_sse2_tan). I solved this by renaming these functions in the code but keeping the original export name through spec files.
Is there any chance for such changes to find the way upstream? If yes, could you please advice how is it best to proceed: create a bug first, or just send a patch (probably 2 separate patches) to wine-patches for review?
Thanks, Paul.
On Dec 22, 2015 2:52 AM, "Paul Gofman" gofmanp@gmail.com wrote:
Dear all,
I compiled Wine with icc and found 2 issues, which I managed to fix
in the code. The issues are:
- Crash in Wine loader (at least with using Intel compiler) Checking return values from all the calls to wld_mprotect in
loader/preloader.c solved the issue (apparently syscall was optimized out when return value was not used, which is likely a compiler problem)
- msvcrt/math.c has a number of trigonometrical functions
implementations named __libm_sse2_... (e. g., __libm_sse2_cos). icc substitutes these names for some of trigonometrical functions (e. g., tan is replaced internally by __libm_sse2_tan). This results in endless recursion and stack overflow both in __lib_sse2_tan and the ordinary tan function in msvcrt (which is get aliased to __libm_sse2_tan). I solved this by renaming these functions in the code but keeping the original export name through spec files.
Is there any chance for such changes to find the way upstream? If
yes, could you please advice how is it best to proceed: create a bug first, or just send a patch (probably 2 separate patches) to wine-patches for review?
Thanks, Paul.
Hi Paul,
Thanks for debugging and fixing. There's no need to file bugs, you can just send the two patches with descriptions of why they're needed.
See http://wiki.winehq.org/SubmittingPatches for more details.