Changes between Version 1 and Version 2 of Ticket #1448, comment 1


Ignore:
Timestamp:
02/04/22 09:36:49 (2 years ago)
Author:
Gert Döring
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1448, comment 1

    v1 v2  
    2020}}}
    2121
    22 ... and this number is too big for an "int", so it overflows.  On Linux, the result of the overflow seems to be "0" (and on MinGW-built Windows), so it does "nothing".  On MSVC built, the result is (2**31)-1 (214748364), which is about 2Gbyte - hard to achieve in  15minutes normally, so "it does as instructed".
     22... and this number is too big for an "int", so it overflows.  On Linux, the result of the overflow seems to be "0" (and on MinGW-built Windows), so it does "nothing".  On MSVC built, the result is (2^^31)-1 (214748364), which is about 2Gbyte - hard to achieve in  15minutes normally, so "it does as instructed".
    2323
    2424Now, what to do about it?  Go for a long for option parsing?  And then what?  Stay with a "long" (and update all the code paths to "long") or warn/abort if there is an integer overlflow, keeping the existing behaviour but making clear what happens?