Bug 335563 - wine's kernel32/thread test fails under valgrind
Summary: wine's kernel32/thread test fails under valgrind
Status: REPORTED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-30 00:45 UTC by Austin English
Modified: 2014-08-29 23:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Austin English 2014-05-30 00:45:28 UTC
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
Comment 1 Julian Seward 2014-08-29 23:33:27 UTC
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.