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

Home NTDEV

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: https://www.osr.com/osr-learning-library/


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

Paul_BunnPaul_Bunn Member Posts: 251
The reason I was able to repro it at home was because I had failed to apply
SP3 for VisualStudio6. I was unable to repro in any cases on my main dev
machine at work. Therefore, I am concluding that the bug in the optimizer
has already been addressed by SP3.

For [email protected]: Here is where you can get SP3 for VS:
http://msdn.microsoft.com/downloads/c-frame.htm?001#/downloads/spacks/
You will need an active MSDN subscription to access I think.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com


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


Paul,

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.

Thanks,
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
up-front).

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
code.

Regards,

Paul Bunn, UltraBac.com, 425-644-6000
Microsoft MVP - WindowsNT/2000
http://www.ultrabac.com

-----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 >=
0
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
the
free build is iCount > -1 thne in the machine code there is a comparision
and
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 ??]
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