NtMapViewOfSection - Chasing more holes
NtMapView of Section is returning bad values from the wineserver calls trace:virtual:MapViewOfFileEx Mapping Section View handle=58, pid=ffffffff, addr=0 zbits=0 commit=0, offs_l=0 offs_h=0 count=0 trace:virtual:NtMapViewOfSection handle=58 process=ffffffff addr=0 off=000000000 size=0 access=4 View: 7f640000 - 7f640fff (anonymous) 7f640000 - 7f640fff c-rw- trace:virtual:NtMapViewOfSection handle=58 size=1000 offset=000000000 trace:virtual:MapViewOfFileEx Mapping Section View handle=78, pid=ffffffff, addr=0 zbits=0 commit=0, offs_l=0 offs_h=0 count=0 trace:virtual:NtMapViewOfSection handle=78 process=ffffffff addr=0 off=000000000 size=0 access=2 Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0xffffffff, addr_ptr=0x7fd8ed48, zero_bits=0, commit_size=0, offset=0x7fd8ed1c, size_ptr=0x7fd8ed44, inherit=ViewShare, alloc_type=0, protect=2) at virtual.c:1737 1737 ERR("Sizes larger than 4Gb not supported\n"); (gdb) disp base 1: base = (void *) 0x0 (gdb) disp header_size 2: header_size = 0 (gdb) disp size_high 3: size_high = 74960 (gdb) disp size_low 4: size_low = 77824 (gdb) disp res 5: res = 0 (gdb) This doesn't seem right to me. Bob
On Sun, 17 Apr 2005 03:38 pm, Robert Lunnon wrote:
NtMapView of Section is returning bad values from the wineserver calls trace:virtual:MapViewOfFileEx Mapping Section View handle=58, pid=ffffffff, addr=0 zbits=0 commit=0, offs_l=0 offs_h=0 count=0 trace:virtual:NtMapViewOfSection handle=58 process=ffffffff addr=0 off=000000000 size=0 access=4 View: 7f640000 - 7f640fff (anonymous) 7f640000 - 7f640fff c-rw- trace:virtual:NtMapViewOfSection handle=58 size=1000 offset=000000000 trace:virtual:MapViewOfFileEx Mapping Section View handle=78, pid=ffffffff, addr=0 zbits=0 commit=0, offs_l=0 offs_h=0 count=0 trace:virtual:NtMapViewOfSection handle=78 process=ffffffff addr=0 off=000000000 size=0 access=2
Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0xffffffff, addr_ptr=0x7fd8ed48, zero_bits=0, commit_size=0, offset=0x7fd8ed1c, size_ptr=0x7fd8ed44, inherit=ViewShare, alloc_type=0, protect=2) at virtual.c:1737 1737 ERR("Sizes larger than 4Gb not supported\n");
(gdb) disp base 1: base = (void *) 0x0 (gdb) disp header_size 2: header_size = 0 (gdb) disp size_high 3: size_high = 74960 (gdb) disp size_low 4: size_low = 77824 (gdb) disp res 5: res = 0 (gdb)
This doesn't seem right to me.
Bob
Well here I am talking to myself.... For those that care I have locaed this problem to this code in server/mapping.c function get_file_size() *size_high = st.st_size >> 32; it seems gcc gets this wrong when sizeof(st.st_size) == 4 This following code fixes the problem *size_high= (sizeof(st.st_size) >4) ? (st.st_size >> 32) : 0;
"Robert Lunnon" <bobl(a)optushome.com.au> wrote:
Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0xffffffff, addr_ptr=0x7fd8ed48, zero_bits=0, commit_size=0, offset=0x7fd8ed1c, size_ptr=0x7fd8ed44, inherit=ViewShare, alloc_type=0, protect=2) at virtual.c:1737 1737 ERR("Sizes larger than 4Gb not supported\n");
(gdb) disp base 1: base = (void *) 0x0 (gdb) disp header_size 2: header_size = 0 (gdb) disp size_high 3: size_high = 74960 (gdb) disp size_low 4: size_low = 77824 (gdb) disp res 5: res = 0 (gdb)
This doesn't seem right to me.
Is that with current CVS? Line number indicates that it is not. -- Dmitry.
On Sun, 17 Apr 2005 10:32 pm, Dmitry Timoshkov wrote:
"Robert Lunnon" <bobl(a)optushome.com.au> wrote:
Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0xffffffff, addr_ptr=0x7fd8ed48, zero_bits=0, commit_size=0, offset=0x7fd8ed1c, size_ptr=0x7fd8ed44, inherit=ViewShare, alloc_type=0, protect=2) at virtual.c:1737 1737 ERR("Sizes larger than 4Gb not supported\n");
(gdb) disp base 1: base = (void *) 0x0 (gdb) disp header_size 2: header_size = 0 (gdb) disp size_high 3: size_high = 74960 (gdb) disp size_low 4: size_low = 77824 (gdb) disp res 5: res = 0 (gdb)
This doesn't seem right to me.
Is that with current CVS? Line number indicates that it is not.
Its from about a week ago, but the problem has been solved, gcc doesn't make x>>32 = 0 where x is a 32 bit number.
Robert Lunnon wrote:
On Sun, 17 Apr 2005 10:32 pm, Dmitry Timoshkov wrote:
"Robert Lunnon" <bobl(a)optushome.com.au> wrote:
Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0xffffffff, addr_ptr=0x7fd8ed48, zero_bits=0, commit_size=0, offset=0x7fd8ed1c, size_ptr=0x7fd8ed44, inherit=ViewShare, alloc_type=0, protect=2) at virtual.c:1737 1737 ERR("Sizes larger than 4Gb not supported\n");
(gdb) disp base 1: base = (void *) 0x0 (gdb) disp header_size 2: header_size = 0 (gdb) disp size_high 3: size_high = 74960 (gdb) disp size_low 4: size_low = 77824 (gdb) disp res 5: res = 0 (gdb)
This doesn't seem right to me.
Is that with current CVS? Line number indicates that it is not.
Its from about a week ago, but the problem has been solved, gcc doesn't make x>>32 = 0 where x is a 32 bit number.
AFAIK shifting with >= bitsize is "implementation defined" by the C standard. Regards Dominik -- Dominik Strasser | Phone: +49 89 234-43691 Infineon Technologies AG | Fax: +49 89 234-26997 COM CAL D DAT DF V | E-Mail:Dominik.Strasser(a)infineon.com D-81730 Muenchen | Room: 53-263
participants (3)
-
Dmitry Timoshkov -
Dominik Strasser -
Robert Lunnon