Hello,
A few days ago (15 or 16) the support for large files / 64bits was added
to Wine ( files/files.c, server/file.c, win32/file.c).
Since that modification, my Wine installation isn't functional any more,
and wine throws an exception while setting up the SystemHeap.
The exception occurs in heap.c, function HEAP_InitSubHeap, just at the
instruction : "subheap->heap = heap;" while the subheap pointer is
valid.
It seems as if the protection of this memory areay was set to read-only,
and that the mprotect() call did not succeed in setting it to read/write.
I don't know where the real problem is, but since I found no record of
such problem in the lists archive, it may be a configuration problem of
mine.
However, having not found the solution, I'd like some advices.
I also think it could be a problem with my glibc not functionning with
64bits functions.
My system is a Linux 2.4.4 / RedHat 7.0 / redhat's glibc 2.2-12
Here is a working trace, before the support for 64bits functions was added :
==============================================================================
0806cb00:trace:virtual:CreateFileMappingA
(ffffffff,(nil),08000004,0000000000110000,"__SystemHeap")
0806cb00: create_mapping( size_high=0, size_low=1114112, protect=67,
inherit=0,file_handle=0, name=L"__SystemHeap" )
0806cb00: create_mapping() = 0 { handle=32 }
0806cb00: get_mapping_info( handle=32 )
0806cb00: get_mapping_info() = 0 { size_high=0, size_low=1114112,
protect=67, header_size=0, base=(nil), shared_file=0, shared_size=0 }
0806cb00: get_handle_fd( handle=32, access=00000000 )
0806cb00: *fd* 32 -> 9
0806cb00: get_handle_fd() = 0 { fd=-1 }
0806cb00: set_handle_info( handle=32, flags=0, mask=0, fd=6 )
0806cb00: set_handle_info() = 0 { old_flags=0, cur_fd=6 }
0806cb00:trace:virtual:MapViewOfFileEx handle=20 size=110000 offset=0
0806cb00: dup_handle( src_process=-1, src_handle=32, dst_process=-1,
access=00000000, inherit=0, options=2 )
0806cb00: dup_handle() = 0 { handle=36, fd=-1 }
View: 65430000 - 6553ffff 36
65430000 - 6553ffff c-rW-
0806cb00:trace:virtual:VirtualAlloc 65430000 00110000 1000 00000040
0806cb00:trace:virtual:VIRTUAL_SetProt 65430000-6553ffff c-rWx
View: 65430000 - 6553ffff 36
65430000 - 6553ffff c-rWx
0806cb00: create_semaphore( initial=00000000, max=00000001, inherit=0,
name=L"")
==============================================================================
Here is the stack trace with support for 64 bits functions (more debug
traces of mine.)
==============================================================================
0806cb40:trace:virtual:CreateFileMappingA
(ffffffff,(nil),08000004,0000000000110000,"__SystemHeap")
0806cb40: create_mapping( size_high=0, size_low=1114112, protect=67,
inherit=0, file_handle=0, name=L"__SystemHeap" )
0806cb40: create_mapping() = 0 { handle=32 }
0806cb40:trace:heap:HEAP_CreateSystemHeap LLA
0806cb40: get_mapping_info( handle=32 )
0806cb40: get_mapping_info() = 0 { size_high=0, size_low=1114112,
protect=67, header_size=0, base=(nil), shared_file=0, shared_size=0 }
0806cb40: get_handle_fd( handle=32, access=00000000 )
0806cb40: *fd* 32 -> 9
0806cb40: get_handle_fd() = 0 { fd=-1 }
0806cb40: set_handle_info( handle=32, flags=0, mask=0, fd=6 )
0806cb40: set_handle_info() = 0 { old_flags=0, cur_fd=6 }
0806cb40:trace:virtual:MapViewOfFileEx handle=20 size=110000 offset=0
0806cb40: dup_handle( src_process=-1, src_handle=32, dst_process=-1,
access=00000000, inherit=0, options=2 )
0806cb40: dup_handle() = 0 { handle=36, fd=-1 }
View: 65430000 - 6553ffff 36
65430000 - 6553ffff c-rW-
0806cb40:trace:heap:HEAP_CreateSystemHeap LLA - after MapViewOfFileEx : 1077
0806cb40:trace:heap:HEAP_CreateSystemHeap LLA - line 1081
0806cb40:trace:heap:HEAP_InitSubHeap LLA address = 65430000 - line 478
0806cb40:trace:heap:HEAP_InitSubHeap LLA - line 482
0806cb40:trace:virtual:VirtualAlloc 65430000 00110000 1000 00000040
0806cb40:trace:virtual:VIRTUAL_SetProt 65430000-6553ffff c-rWx
View: 65430000 - 6553ffff 36
65430000 - 6553ffff c-rWx
0806cb40:trace:virtual:VirtualAlloc LLA 65430000 00110000 1000 00000040
VIRTUAL_SetProt : base= 65430000
0806cb40:trace:heap:HEAP_InitSubHeap LLA - line 491
0806cb40:trace:heap:HEAP_InitSubHeap LLA subheap = 65430000 - line 518
0806cb40:trace:seh:EXC_RtlRaiseException code=c0000005 flags=0
0806cb40: queue_exception_event( first=1,
record={context={flags=00000000,eax=00000047,ebx=4012c0ec,ecx=65430000,edx=65430000,esi=40128e05,edi=00110000,ebp=00000000,eip=400bb7eb,esp=40626dd0,eflags=00010212,cs=0023,ds=002b,es=002b,fs=008f,gs=0000,dr0=00000000,dr1=00000000,dr2=00000000,dr3=00000000,dr6=00000000,dr7=00000000,float={00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000}},rec={code=c0000005,flags=0,rec=(nil),addr=0x400bb7eb,params={1,65430010}
)
0806cb40: queue_exception_event() = 0 { handle=0 }
==============================================================================
Any clues are welcome.
Best regards,
Ludovic LANGE