PDA

View Full Version : Is SetupData.CalculateRequiredSpace() 32 bit? - sizes beyond 4 GB are overflowing


Tom
07-13-2005, 07:55 AM
Hi,

I noticed that when compiling source data beyond 4 GB (this is no bumptious "I'm-making-noise-about-a-bug-no-matter-that-it-will-never-appear-in-real-life"; we really have source data that big), the return value of SetupData.CalculateRequiredSpace() is the correct size in bytes MODULO 0xFFFFFFFF, IOW multiples of 0xFFFFFFFF = (2^32)-1 = (4 GB)-1 are subtracted. It seems that somwhere in the calculation process there is a 32 bit variable involved which is overflowing.
Does anyone know a way to detect how often the overflow happened to fix the return value, or any other workaround (or maybe just a download link to an update which fixes SetupData.CalculateRequiredSpace() :) )?

Thx for any info...

Adam
07-13-2005, 12:26 PM
Tom,

You are correct with your findings. I have logged this to be looked into for the next release of the software. It appears to reset after 4GB so you may be able to fudge this by adding the difference to the resulted variable?

Adam Kapilik

Tom
07-14-2005, 11:16 AM
Hi Adam,

you're right,

_SpaceRequired = SetupData.CalculateRequiredSpace();
_SpaceRequired = _SpaceRequired + 4294967295;

does indeed work and the value is processed correctly from then on. Thanks for the quick help :) and if there'd be a fix (to make allowance for generality) in the new version I'd be delighted.

Tom

Adam
07-14-2005, 11:41 AM
Tom,

We will look into this for the next service release of the software.

Adam Kapilik

Tom
10-06-2005, 10:29 AM
I noticed this is fixed for version 7.0.4.0 - thanks a lot :)

Adam
10-06-2005, 10:39 AM
Great to hear that your issue has been solved.

Adam Kapilik