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

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 xxxxx@procsys.com: 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:xxxxx@Exchange.Microsoft.com]
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:xxxxx@ultrabac.com]
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:xxxxx@procsys.com]
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 ??]