LLVM miscompiles Wine's dlls/msvcp90/test/string.c #10122
Labels
bugzilla
Issues migrated from bugzilla
clang
Clang issues not falling into any other category
miscompilation
Extended Description
Compiling wine's msvcp90/test/string.c file with clang causes the string test to crash on running:
austin@midna:~/wine-clang/dlls/msvcp90/tests$ rm string.o ; clang -m32 -c -I. -I. -I../../../include -I../../../include -I../../../include/msvcrt -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -std=gnu89 -g -fno-builtin -o string.o string.c && make && make string.ok:
...
wine: Unhandled page fault on execute access to 0x00000000 at address (nil) (thread 0009), starting debugger...
Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (0x00000000).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:00000000 ESP:0032fcd8 EBP:68187ff4 EFLAGS:00010202( R- -- I - - - )
EAX:5561cff4 EBX:7b8acf00 ECX:0032fcc4 EDX:0032fcc4
ESI:74736500 EDI:00720020
Stack dump:
0x0032fcd8: 0000000f 0000032d 7b86ec60 68187ff4
0x0032fce8: 0032fd18 6817ed18 00000001 7ffd8000
0x0032fcf8: 7ffd8000 0000032d 0032fd78 68184dd6
0x0032fd08: 68187ff4 0032fe38 7b86ec60 68187ff4
0x0032fd18: 0032fd78 68184364 00110410 0000000c
0x0032fd28: ffffffff 00000000 0132fd58 0032fe38
Backtrace:
=>0 0x00000000 (0x68187ff4)
1 0x00000000 (0x0001bef4)
2 0x00000000 (0x00000000)
0x00000000: addb %al,0x0(%eax)
compiling that file with gcc works fine. I believe this also occurred in trunk, will verify on another machine when time permits.
Attaching the output of clang -m32 -E -I. -I. -I../../../include -I../../../include -I../../../include/msvcrt -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wstrict-prototypes -Wtype-limits -Wwrite-strings -Wpointer-arith -std=gnu89 -g -fno-builtin -o string.i string.c
The text was updated successfully, but these errors were encountered: