Re: NtMapViewOfSection - Chasing more holes

2005-04-18 Thread Dominik Strasser
Robert Lunnon wrote:
On Sun, 17 Apr 2005 10:32 pm, Dmitry Timoshkov wrote:
Robert Lunnon [EMAIL PROTECTED] wrote:
Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0x,
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
1737ERR(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 
x32 = 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:[EMAIL PROTECTED]
D-81730 Muenchen | Room: 53-263


Re: NtMapViewOfSection - Chasing more holes

2005-04-17 Thread Robert Lunnon
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=,
 addr=0 zbits=0 commit=0, offs_l=0 offs_h=0 count=0
 trace:virtual:NtMapViewOfSection handle=58 process= addr=0
 off=0 size=0 access=4
 View: 7f64 - 7f640fff (anonymous)
   7f64 - 7f640fff c-rw-
 trace:virtual:NtMapViewOfSection handle=58 size=1000 offset=0
 trace:virtual:MapViewOfFileEx Mapping Section View handle=78, pid=,
 addr=0 zbits=0 commit=0, offs_l=0 offs_h=0 count=0
 trace:virtual:NtMapViewOfSection handle=78 process= addr=0
 off=0 size=0 access=2

 Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0x,
 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
 1737ERR(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;




Re: NtMapViewOfSection - Chasing more holes

2005-04-17 Thread Dmitry Timoshkov
Robert Lunnon [EMAIL PROTECTED] wrote:

 Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0x, 
 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
 1737ERR(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.




Re: NtMapViewOfSection - Chasing more holes

2005-04-17 Thread Robert Lunnon
On Sun, 17 Apr 2005 10:32 pm, Dmitry Timoshkov wrote:
 Robert Lunnon [EMAIL PROTECTED] wrote:
  Breakpoint 2, NtMapViewOfSection (handle=0x78, process=0x,
  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
  1737ERR(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 
x32 = 0 where x is a 32 bit number.