Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results


Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

RE: Can we declare a variable as 'int' in the driver --???

OSR_Community_UserOSR_Community_User Member Posts: 110,217

Can you send me the complete source code that you used to repro and I'll
take care of "raise this a bug to MS."

Also, please indicate which version of the DDK and compiler you're using.

Sandy Spinrad
Device Driver Evangelist
Microsoft Corporation

-----Original Message-----
From: Paul Bunn [mailto:[email protected]]
Sent: Friday, June 23, 2000 8:49 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Can we declare a variable as 'int' in the driver

I've repro'd this here -- this is, as I originally suggested, a bug in the
compiler (the optimizer). It's quite rare these days to discover these
types of bugs in the compiler since its wide use.
You need to raise this as a bug with MS. Note that there will be no charge
for this once confirmed as a bug (you'll be given a refund for any fees paid

Interestingly, changing iCount to a short or char forces the compiler to use
another register for iteration count (the original register is still used
for the 24h, 18h, ... series). This forces the compiler to generate correct


Paul Bunn,, 425-644-6000
Microsoft MVP - WindowsNT/2000

-----Original Message-----
From: Eshanye.K.P [mailto:[email protected]]
Sent: Friday, June 23, 2000 3:01 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Can we declare a variable as 'int' in the driver

Actually if the condition of the foor loop in the free build is iCount >=
then in the m/c code there is no comparision at all there will be a
unconditional jump to the beginig of the foor loop like this

000b9 83 ef 08 sub edi, 8
000bc eb ce jmp SHORT $L13115

- so it goes to infinite loop. Where are in the condition of for loop in
free build is iCount > -1 thne in the machine code there is a comparision
then this a "ja" [jump if above ?? ] to the begining of the for loop...
like this

000ba 83 ef 08 sub edi, 8
000bd 83 ff f8 cmp edi, -8 ; fffffff8H
000c0 77 cb ja SHORT $L13115

so this wont be an infinite loop !!!!! [This is the optimisation of the
compiler ??]


You are currently subscribed to ntdev as: [email protected]
To unsubscribe send a blank email to $subst('Email.Unsub')
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 13-17 May 2024 Live, Online
Developing Minifilters 1-5 Apr 2024 Live, Online
Internals & Software Drivers 11-15 Mar 2024 Live, Online
Writing WDF Drivers 20-24 May 2024 Live, Online