[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] b558ef: Attempt to fix https://github.com/OpenSmalltalk/op...

Nicolas Cellier noreply at github.com
Wed Mar 9 21:30:48 UTC 2022

  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: b558efdd677dee45458c6d176b642b2b36f46e28
  Author: Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>
  Date:   2022-03-09 (Wed, 09 Mar 2022)

  Changed paths:
    M platforms/Cross/plugins/BitBltPlugin/BitBltInternal.h

  Log Message:
  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 mailing list