[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b558ef: Attempt to fix https://github.com/OpenSmalltalk/op...
noreply at github.com
Wed Mar 9 21:30:48 UTC 2022
Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
Date: 2022-03-09 (Wed, 09 Mar 2022)
Attempt to fix https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/617
I think that using a uint32_t for representing a negative pitch does not work on 64 bits architecture.
It will lead to large positive offset (2^32-pitch) instead of negative (-pitch).
We must use either a signed int, or a uint64_t. Let's choose usqInt which will work for both 32 and 64bits arch.
Using a signed int would be a good option too, but without a careful analysis of potential signed arithmetic overflow, keep it safe, stay unsigned...
More information about the Vm-dev