[PATCH v2 4/4] kernelbase: Return TRUE from DeviceIoControl() if the NT status denotes success.

Zebediah Figura (she/her) zfigura at codeweavers.com
Fri Aug 27 11:54:07 CDT 2021


On 8/27/21 11:22 AM, Alexandre Julliard wrote:
> Zebediah Figura <zfigura at codeweavers.com> writes:
> 
>> Likely a similar treatment should be given to other kernelbase APIs, but it's not immediately clear which.
>>
>> Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
>> ---
>>   dlls/kernelbase/file.c             | 7 ++++++-
>>   dlls/ntoskrnl.exe/tests/ntoskrnl.c | 6 +++---
>>   2 files changed, 9 insertions(+), 4 deletions(-)
> 
> This breaks the tests:
> 
> tools/runtest -q -P wine -T . -M kernel32.dll -p dlls/kernel32/tests/kernel32_test.exe volume && touch dlls/kernel32/tests/volume.ok
> wine: Unhandled page fault on read access to 013539BB at address 7BC51E77 (thread 0024), starting debugger...
> Unhandled exception: page fault on read access to 0x013539bb in 32-bit code (0x7bc51e77).
> Register dump:
>   CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
>   EIP:7bc51e77 ESP:0031fc14 EBP:0031fc18 EFLAGS:00010216(  R- --  I   -A-P- )
>   EAX:013539bb EBX:0000005c ECX:013539d1 EDX:7b09c41c
>   ESI:00fb3998 EDI:013539bb
> Stack dump:
> 0x0031fc14:  00000002 0031fc78 7b07f615 013539bb
> 0x0031fc24:  7b09c41c 00000016 7b01719e 7b09c140
> 0x0031fc34:  00000000 00000003 00000400 00fb3978
> 0x0031fc44:  00000018 0031fcc8 00fb2b68 00000000
> 0x0031fc54:  008e02c8 00fb3978 0000005c 00000064
> 0x0031fc64:  00000285 0031fc90 00000064 7ffc2000
> Backtrace:
> =>0 0x7bc51e77 memcmp+0x27(ptr2=0x7b09c41c, n=0x16) [Z:\home\julliard\wine\wine\dlls\ntdll\string.c:89] in ntdll (0x0031fc18)
>    1 0x7b07f615 FindNextVolumeW+0x6f(volume=<couldn't compute location>, len=<couldn't compute location>) [Z:\home\julliard\wine\wine\dlls\kernelbase\volume.c:1105] in kernelbase (0x0031fc78)
>    2 0x7b07f90f FindFirstVolumeW+0x189(len=<couldn't compute location>) [Z:\home\julliard\wine\wine\dlls\kernelbase\volume.c:1079] in kernelbase (0x0031fcf8)
>    3 0x7b632080 FindFirstVolumeA+0x4f(len=<couldn't compute location>) [Z:\home\julliard\wine\wine\dlls\kernel32\volume.c:474] in kernel32 (0x0031fd58)
>    4 0x00566ed6 func_volume+0x135() [Z:\home\julliard\wine\wine\dlls\kernel32\tests\volume.c:198] in kernel32_test (0x0031fe08)
>    5 0x0056998b main+0x26a(argv=<is not available>) [Z:\home\julliard\wine\wine\include\wine\test.h:612] in kernel32_test (0x0031fee8)
>    6 0x00568bef mainCRTStartup+0x7e() [Z:\home\julliard\wine\wine\dlls\msvcrt\crt_main.c:58] in kernel32_test (0x0031ff30)
>    7 0x7b62e010 WriteTapemark+0xff(type=<is not available>, count=<is not available>, immediate=<is not available>) [Z:\home\julliard\wine\wine\dlls\kernel32\tape.c:317] in kernel32 (0x0031ff48)
>    8 0x7bc54bf7 RtlSleepConditionVariableSRW+0x226(lock=<is not available>, timeout=<is not available>, flags=<is not available>) [Z:\home\julliard\wine\wine\dlls\ntdll\sync.c:556] in ntdll (0x0031ff5c)
>    9 0x7bc552b0 call_thread_func+0xaf(arg=0x7ffd1000) [Z:\home\julliard\wine\wine\dlls\ntdll\thread.c:225] in ntdll (0x0031ffec)
> 0x7bc51e77 memcmp+0x27 [Z:\home\julliard\wine\wine\dlls\ntdll\string.c:89] in ntdll: cmpb	%bl,0x0(%eax)
> 89	        if (*p1 < *p2) return -1;
> 

Thanks, I don't get that test failure, but I think I see the bug regardless.



More information about the wine-devel mailing list