This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: /proc/uptime etc. - NtQuerySystemInformation() needs bigger structure


>> --- winsup/cygwin/ntdll.h.old 2002-05-30 21:21:04.000000000 +0100
>> +++ winsup/cygwin/ntdll.h     2002-07-05 11:15:52.000000000 +0100
>> @@ -58,6 +58,7 @@ typedef struct _SYSTEM_PROCESSOR_TIMES
>>    LARGE_INTEGER DpcTime;
>>    LARGE_INTEGER InterruptTime;
>>    ULONG InterruptCount;
>> +  ULONG Unused;
>>  } SYSTEM_PROCESSOR_TIMES, *PSYSTEM_PROCESSOR_TIMES;
>>
>>  typedef LONG KPRIORITY;
>I will look at this patch tonight, but I would be grateful if you could
>answer the following questions:
>What version of binutils are you using?

I had been using 20011002-1.  I've now retried with 20020630-2, and that
just crashes out with a return code of 128, when cygwin1.dll tries to
dereference a null pointer.  (Sorry, I didn't think to try to track down
exactly where until after I'd recompiled with 20011002-1.)

>If you compiled Cygwin using just the 1.3.12 sources with no
>modifications, does /proc/uptime have any content?

I'd not tried that before, under the naïve assumption that I'd just be
recreating the released binary.  But I have now done so, and find that even
using an unmodified ntdll.h works correctly.

Running both the original and my versions of cygwin1.dll through a
disassembler shows that the binary release is passing 0x2c as the structure
length, but that the newly-compiled one passes 0x30 (which is the effect I
was trying to achieve with the patch).  Presumably the structure alignment
is different -- perhaps because it detected and compiled for i686 rather
than i386?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]