Emil Jerabek wrote:
I.e., the range check fails if the result is negative, when interpreted as a signed integer. This is wrong, as all types involved are unsigned, and malloc() can easily return a pointer larger than $80000000. This also means that the 128kB threshold is rather random, and the test failure is heavily system dependent (thus hard to reproduce).
The test indeed passed when I put {$local R-} around "Inc (Address, Size - 1)".
Excellent analysis. The workaround also solves the "systemtest.pas" crash on Mac OS X.
Regards,
Adriaan van Os