[OpenSmalltalk/opensmalltalk-vm] 81d30f: Respect the tab indentation style rather than spac...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[OpenSmalltalk/opensmalltalk-vm] 81d30f: Respect the tab indentation style rather than spac...

Eliot Miranda-3
 
  Branch: refs/heads/Cog
  Home:   https://github.com/OpenSmalltalk/opensmalltalk-vm
  Commit: 81d30f5033605022b493d7fc8725dee30f97b46c
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/81d30f5033605022b493d7fc8725dee30f97b46c
  Author: Nicolas Cellier <[hidden email]>
  Date:   2020-02-09 (Sun, 09 Feb 2020)

  Changed paths:
    M platforms/Cross/plugins/Squeak3D/b3dMain.c

  Log Message:
  -----------
  Respect the tab indentation style rather than space indent


  Commit: 2ec508a718ca5a00e205c5e0356499ef27d6a87e
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/2ec508a718ca5a00e205c5e0356499ef27d6a87e
  Author: Nicolas Cellier <[hidden email]>
  Date:   2020-02-09 (Sun, 09 Feb 2020)

  Changed paths:
    M platforms/Cross/plugins/Squeak3D/b3dMain.c

  Log Message:
  -----------
  Instrument the Squeak3D fill list operations with additional consistency checks

Removing a face which is absent from the fill list will break the fill list.
Indeed, fill list is a doubly linked list, and remove function is reconnecting prevFace and nextFace of removed face.
But if this face has already been removed, we reuse dangling prevFace/nextFace and break the linked list...

Same for adding: if the face was already on the list, we ignore the prevFace/nextFace links and thus break the fill list too.

Note that this change just instrument, not fix.


  Commit: 3a0e796dd122fb8f7eb16a11bc1f83d6ab78a10c
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/3a0e796dd122fb8f7eb16a11bc1f83d6ab78a10c
  Author: Nicolas Cellier <[hidden email]>
  Date:   2020-02-09 (Sun, 09 Feb 2020)

  Changed paths:
    M platforms/Cross/plugins/Squeak3D/b3dMain.c

  Log Message:
  -----------
  Squeak3D fillList: nullify the prevFace/nextFace chain of removed face

This is not a proper fix, just fool-proofing.


  Commit: 36a1f1e2ef637347ed3b81a2f4cf8df347e4d803
      https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/36a1f1e2ef637347ed3b81a2f4cf8df347e4d803
  Author: Nicolas Cellier <[hidden email]>
  Date:   2020-02-09 (Sun, 09 Feb 2020)

  Changed paths:
    M platforms/Cross/plugins/Squeak3D/b3dMain.c

  Log Message:
  -----------
  Workaround a Squeak3D crash

After proper instrumentation, it appears that a reproducible crash case provided by Stephane Rollandin is due to attempt of removing a face which is not in the fillList.
This happens in the special case when `leftEdge == lastIntersection`, and the code attempts to remove `leftEdge->rightFace` which seem to not always be on the fillList.
It's not obvious to understand if this is really an invariant of the loop, or a wrong expectation.
Thus, as a workaround, protect the removal by a preliminary inclusion test.

Note that removing or adding a face should change its `B3D_FACE_ACTIVE` flags.
Normally, we remove then add, so do not have to toggle the flag.
But if we do not remove, then we must toggle, otherwise another invariant will break and cause crash in `b3dToggleTopFills`.


Compare: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/015d381da7b5...36a1f1e2ef63