These tests pass when not run under valgrind: thread.c:1413: Test failed: Expected FPU control word 0x27f, got 0x37f. thread.c:1416: Test failed: Expected FPU control word 0x27f, got 0x37f. thread.c:1420: Test failed: Expected FPU control word 0xf60, got 0xf7f. thread.c:1423: Test failed: Expected FPU control word 0x27f, got 0x37f. thread.c:1426: Test failed: Expected FPU control word 0xf60, got 0xf7f. filed originally upstream with wine at https://bugs.winehq.org/show_bug.cgi?id=28817, but in https://bugs.winehq.org/show_bug.cgi?id=28817#c4, was referred here. Reproducible: Always Steps to Reproduce: Compile wine (probably not needed, but for reference, I used CFLAGS="-g -O0 -fno-inline") cd wine/dlls/kernel32/tests export VALGRIND_OPTS="-q --trace-children=yes --track-origins=yes --gen-suppressions=all --suppressions=$WINESRC/tools/valgrind/valgrind-suppressions --suppressions=$WINESRC/tools/valgrind/valgrind-suppressions-external --suppressions=$WINESRC/tools/valgrind/valgrind-suppressions-ignore --leak-check=full --num-callers=20 --workaround-gcc296-bugs=yes --vex-iropt-register-updates=allregs-at-mem-access" export WINETEST_TIMEOUT=600 export WINETEST_WRAPPER=/opt/valgrind/bin/valgrind export WINE_HEAP_TAIL_REDZONE=32 export OANOCACHE=1 make thread.ok Actual Results: test fails Expected Results: test passes valgrind-3.10.0.SVN
This is the result of VEX's approximations in x87 FPU emulation, and in particular, the fact that VEX ignores attempts to change the FP precision settings in the FPUCW. 037f is the normal value, and 027f represents an a request to change precision to 64 bit instead of 80 bit. (This despite the fact that VEX actually implements 80 bit arithmetic at 64 bits). I don't think there's anything that can be done here without considerable effort.