So I'm running tests in an XP SP1 VM and yet, you can see no such results on http://test.winehq.org/data/. The reason for is that the 'kernel32_test loader' causes XP SP1 to crash, so that winetest.exe never has an opportunity to send the results.
So I investigated this and the specific test that causes the crash is this one:
{ &dos_header, sizeof(dos_header), 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x200, 0x200, sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), ERROR_SUCCESS },
I noticed the 0x1000. Shouldn't this be a 0x200? Or is that the whole point of this test? In any case, changing it to 0x200 avoids crashing SP1.
Another weird way to avoid the crash is to introduce a Sleep(1000) just before the LoadLibrary().
I've summed up both ways to avoid the crash in the patch below. Hopefully someone more familiar with the loader than me can have a look into this and suggest a proper fix.
diff --git a/dlls/kernel32/tests/loader.c b/dlls/kernel32/tests/loader.c index 49af819..f9f9e0b 100644 --- a/dlls/kernel32/tests/loader.c +++ b/dlls/kernel32/tests/loader.c @@ -139,7 +139,7 @@ START_TEST(loader) }, { &dos_header, sizeof(dos_header), 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x200, 0x200, - sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, + sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0xf00, sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), ERROR_SUCCESS }, @@ -321,6 +322,11 @@ START_TEST(loader) file_size = GetFileSize(hfile, NULL); CloseHandle(hfile);
+ if (0 && i == 4) + { + /* Required to avoid a crash on Windows XP SP1 */ + Sleep(1000); + } SetLastError(0xdeadbeef); hlib = LoadLibrary(dll_name); if (td[i].error == ERROR_SUCCESS)
"Francois Gouget" fgouget@free.fr wrote:
So I'm running tests in an XP SP1 VM and yet, you can see no such results on http://test.winehq.org/data/. The reason for is that the 'kernel32_test loader' causes XP SP1 to crash, so that winetest.exe never has an opportunity to send the results.
So I investigated this and the specific test that causes the crash is this one:
{ &dos_header, sizeof(dos_header), 1, sizeof(IMAGE_OPTIONAL_HEADER), 0x200, 0x200, sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER) + 0x1000, sizeof(dos_header) + sizeof(nt_header) + sizeof(IMAGE_SECTION_HEADER), ERROR_SUCCESS },
I noticed the 0x1000. Shouldn't this be a 0x200? Or is that the whole point of this test? In any case, changing it to 0x200 avoids crashing SP1.
Another weird way to avoid the crash is to introduce a Sleep(1000) just before the LoadLibrary().
I've summed up both ways to avoid the crash in the patch below. Hopefully someone more familiar with the loader than me can have a look into this and suggest a proper fix.
A proper fix would be either to remove that particular test altogether, or replace 0x1000 by 0x200.
On Mon, 5 Nov 2007, Dmitry Timoshkov wrote: [...]
A proper fix would be either to remove that particular test altogether, or replace 0x1000 by 0x200.
Oops, I see that in the patch I sent it was still set to 0xf00 which was just an experiment. Setting it to 0x200 works for me. I'm sending a patch.