Stefan Dösinger <stefan(a)codeweavers.com> writes:
> This supersedes patch 98009. It renames the allocation and free
> functions as suggested by Henri.
It doesn't work:
../../../tools/runtest -q -P wine -M d3dx9_36.dll -T ../../.. -p d3dx9_36_test.exe.so texture.c && touch texture.ok
texture.c:555: Tests skipped: No D3DUSAGE_AUTOGENMIPMAP support for volume textures
wine: Unhandled page fault on write access to 0x00000000 at address 0x7bc4a5cf (thread 003c), starting debugger...
Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x7bc4a5cf).
Register dump:
CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
EIP:7bc4a5cf ESP:0032f79c EBP:0032f898 EFLAGS:00010202( R- -- I - - - )
EAX:00000000 EBX:7bcbc474 ECX:00164268 EDX:68d795a0
ESI:00110014 EDI:001642c8
Stack dump:
0x0032f79c: 7bc37d5d 00000050 00000002 00164278
0x0032f7ac: 00000000 00000000 00000000 00000000
0x0032f7bc: 687c05d8 00000001 00000000 00000000
0x0032f7cc: 4d430003 00000000 00000000 00000000
0x0032f7dc: 00000000 00000000 4d430001 00164268
0x0032f7ec: 00000010 00000000 00000000 00000000
Backtrace:
=>0 0x7bc4a5cf HEAP_CreateFreeBlock+0x36f(subheap=0x110014, ptr=0x164268, size=0x60) [/home/julliard/wine/wine/dlls/ntdll/../../include/wine/list.h:101] in ntdll (0x0032f898)
1 0x7bc4a878 HEAP_MakeInUseBlockFree+0x157(subheap=0x110014, pArena=<is not available>) [/home/julliard/wine/wine/dlls/ntdll/heap.c:656] in ntdll (0x0032f938)
2 0x7bc4b8e2 RtlFreeHeap+0xd1(heap=<couldn't compute location>, flags=<couldn't compute location>, ptr=<couldn't compute location>) [/home/julliard/wine/wine/dlls/ntdll/heap.c:1771] in ntdll (0x0032f9a8)
3 0x68e0642e wined3d_resource_free_sysmem+0x2d(mem=0x1642c0) [/home/julliard/wine/wine/dlls/wined3d/resource.c:361] in wined3d (0x0032f9d8)
4 0x68e06503 resource_cleanup+0xc2(resource=0x1651e0) [/home/julliard/wine/wine/dlls/wined3d/resource.c:168] in wined3d (0x0032fa28)
5 0x68e6e671 wined3d_volume_decref+0xb0(volume=<couldn't compute location>) [/home/julliard/wine/wine/dlls/wined3d/volume.c:142] in wined3d (0x0032fa68)
6 0x68e5eb42 texture3d_sub_resource_cleanup+0x31(sub_resource=0x1651e0) [/home/julliard/wine/wine/dlls/wined3d/texture.c:1125] in wined3d (0x0032fa98)
7 0x68e5ea8e wined3d_texture_cleanup+0x4d(texture=0x164c70) [/home/julliard/wine/wine/dlls/wined3d/texture.c:126] in wined3d (0x0032fae8)
8 0x68e5fba9 wined3d_texture_decref+0x48(texture=<couldn't compute location>) [/home/julliard/wine/wine/dlls/wined3d/texture.c:449] in wined3d (0x0032fb28)
9 0x68d6701b d3d9_texture_3d_Release+0x5a() in d3d9 (0x0032fb88)
10 0x686a82ea func_texture+0x24d9() [/home/julliard/wine/wine/dlls/d3dx9_36/tests/texture.c:1595] in d3dx9_36_test (0x0032fd38)
11 0x6862c3d7 main+0x386(argc=<is not available>, argv=<is not available>) [/home/julliard/wine/wine/dlls/d3dx9_36/tests/../../../include/wine/test.h:570] in d3dx9_36_test (0x0032fe08)
12 0x686adcc0 __wine_spec_exe_entry+0x7f(peb=<couldn't compute location>) [/home/julliard/wine/wine/dlls/winecrt0/exe_entry.c:36] in d3dx9_36_test (0x0032fe58)
13 0x7b85eb8c call_process_entry+0xb() in kernel32 (0x0032fe78)
14 0x7b85fd6b start_process+0x6a(peb=<couldn't compute location>) [/home/julliard/wine/wine/dlls/kernel32/process.c:1084] in kernel32 (0x0032feb8)
15 0x7bc7a170 call_thread_func_wrapper+0xb() in ntdll (0x0032fed8)
16 0x7bc7d07d call_thread_func+0x7c(entry=0x7b85fd00, arg=0x7ffdf000, frame=0x32ffc8) [/home/julliard/wine/wine/dlls/ntdll/signal_i386.c:2602] in ntdll (0x0032ffa8)
17 0x7bc7a14e call_thread_entry_point+0x11() in ntdll (0x0032ffc8)
18 0x7bc4fade start_process+0x1d(kernel_start=0x7b85fd00) [/home/julliard/wine/wine/dlls/ntdll/loader.c:2694] in ntdll (0x0032ffe8)
19 0x680311ad wine_call_on_stack+0x1c() in libwine.so.1 (0x00000000)
20 0x6803126b wine_switch_to_stack+0x2a(func=0x7bc4fac0, arg=0x7b85fd00, stack=0x330000) [/home/julliard/wine/wine/libs/wine/port.c:59] in libwine.so.1 (0xffd46e68)
21 0x7bc55617 LdrInitializeThunk+0x3a6(kernel_start=<couldn't compute location>, unknown2=<couldn't compute location>, unknown3=<couldn't compute location>, unknown4=<couldn't compute location>) [/home/julliard/wine/wine/dlls/ntdll/loader.c:2750] in ntdll (0xffd46ed8)
22 0x7b8662e0 __wine_kernel_init+0xbbf() [/home/julliard/wine/wine/dlls/kernel32/process.c:1256] in kernel32 (0xffd47de8)
23 0x7bc55ce3 __wine_process_init+0x182() [/home/julliard/wine/wine/dlls/ntdll/loader.c:2959] in ntdll (0xffd47e78)
24 0x6802edf2 wine_init+0x2a1(argc=0x3, argv=0xffd483b4, error="", error_size=0x400) [/home/julliard/wine/wine/libs/wine/loader.c:847] in libwine.so.1 (0xffd47ed8)
25 0x7bf00d3b main+0x7a(argc=<is not available>, argv=<is not available>) [/home/julliard/wine/wine/loader/main.c:237] in <wine-loader> (0xffd48318)
26 0x682518c5 __libc_start_main+0xf4() in libc.so.6 (0x00000000)
0x7bc4a5cf HEAP_CreateFreeBlock+0x36f [/home/julliard/wine/wine/dlls/ntdll/../../include/wine/list.h:101] in ntdll: movl %edx,0x0(%eax)
101 elem->prev->next = elem->next;
--
Alexandre Julliard
julliard(a)winehq.org