Hello,
I made up a fairly repeatable way to crash the Squeak3D plugin again.
Just evaluate the doIt proposed in the image at:
http://www.zogotounga.net/swap/crashlab4.zip
Things go wrong about every other time on my system, sometimes with a
crash dump (one is featured in the archive), sometimes silently.
You will have to way about 20 seconds for the animation to reach the
critical point (when it stops, but sometimes before).
BTW this animation also features a number of glitches - it would be nice
to fix that too, but this is another topic.
Stef
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 811c326986a1e933ac4b9998dd7532c650eb0128
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/811c326986a1e933ac…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2020-02-09 (Sun, 09 Feb 2020)
Changed paths:
M spurlowcodesrc/vm/cogitARMv5.c
M spurlowcodesrc/vm/cogitIA32.c
M spurlowcodesrc/vm/cogitMIPSEL.c
Log Message:
-----------
Try and restore the lowcode capability to return int64 result on various 32bits ABI.
The ABIResultRegHigh needs to be defined.
*** Hack ***
Do not entirely take the regenerated lowcode source from VMMaker.oscog-nice.2709.
As there are other changes pending, this may break something else.
Instead, just cherry pick the minimal change from the generated code with the goal to let CI pass.
We could obtain the exact same result by patching VMMaker.oscog-eem.2705, but this is overkill for a temporary.
Build Update for OpenSmalltalk/opensmalltalk-vm
-------------------------------------
Build: #1943
Status: Errored
Duration: 56 mins and 25 secs
Commit: 36a1f1e (Cog)
Author: Nicolas Cellier
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`.
View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/015d381da7b5...36…
View the full build log and details: https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/648005026?utm_m…
--
You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&ut….
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notificati….
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 81d30f5033605022b493d7fc8725dee30f97b46c
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/81d30f5033605022b4…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
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/2ec508a718ca5a00e2…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
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/3a0e796dd122fb8f7e…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
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/36a1f1e2ef637347ed…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
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...36…
Build Update for OpenSmalltalk/opensmalltalk-vm
-------------------------------------
Build: #1942
Status: Errored
Duration: 1 hr, 55 mins, and 26 secs
Commit: 015d381 (Cog)
Author: Nicolas Cellier
Message: Fix some Squeak3D UB: shifting left some negative int
A reproducible case of crash provided by Stephane Rollandin gives the following warning with clang `-fsanitize=undefined`:
>../../platforms/Cross/plugins/Squeak3D/b3dMain.c:1252:29: runtime error: left shift of negative value -760
>../../platforms/Cross/plugins/Squeak3D/b3dMain.c:1254:25: runtime error: left shift of negative value -751
>../../platforms/Cross/plugins/Squeak3D/b3dDraw.c:317:33: runtime error: left shift of negative value -802
>../../platforms/Cross/plugins/Squeak3D/b3dDraw.c:318:33: runtime error: left shift of negative value -802
>../../platforms/Cross/plugins/Squeak3D/b3dDraw.c:316:33: runtime error: left shift of negative value -114
>../../platforms/Cross/plugins/Squeak3D/b3dMain.c:829:61: runtime error: left shift of negative value -2
On OSX optimized VM, a crash happens in b3dMain.c, in function b3dAddBackFill at line 994 soon after those warnings
By protecting the shift with (unsigned) cast, this particular crash disappear.
There is still other crash happening related to bad fill list, but one thing at a time...
View the changeset: https://github.com/OpenSmalltalk/opensmalltalk-vm/compare/0f974af6a09c...01…
View the full build log and details: https://travis-ci.org/OpenSmalltalk/opensmalltalk-vm/builds/647839209?utm_m…
--
You can unsubscribe from build emails from the OpenSmalltalk/opensmalltalk-vm repository going to https://travis-ci.org/account/preferences/unsubscribe?repository=8795279&ut….
Or unsubscribe from *all* email updating your settings at https://travis-ci.org/account/preferences/unsubscribe?utm_medium=notificati….
Or configure specific recipients for build notifications in your .travis.yml file. See https://docs.travis-ci.com/user/notifications.
Branch: refs/heads/Cog
Home: https://github.com/OpenSmalltalk/opensmalltalk-vm
Commit: 015d381da7b553f0add8aa53b3f72014b16f5c82
https://github.com/OpenSmalltalk/opensmalltalk-vm/commit/015d381da7b553f0ad…
Author: Nicolas Cellier <nicolas.cellier.aka.nice(a)gmail.com>
Date: 2020-02-08 (Sat, 08 Feb 2020)
Changed paths:
M platforms/Cross/plugins/Squeak3D/b3dDraw.c
M platforms/Cross/plugins/Squeak3D/b3dMain.c
Log Message:
-----------
Fix some Squeak3D UB: shifting left some negative int
A reproducible case of crash provided by Stephane Rollandin gives the following warning with clang `-fsanitize=undefined`:
>../../platforms/Cross/plugins/Squeak3D/b3dMain.c:1252:29: runtime error: left shift of negative value -760
>../../platforms/Cross/plugins/Squeak3D/b3dMain.c:1254:25: runtime error: left shift of negative value -751
>../../platforms/Cross/plugins/Squeak3D/b3dDraw.c:317:33: runtime error: left shift of negative value -802
>../../platforms/Cross/plugins/Squeak3D/b3dDraw.c:318:33: runtime error: left shift of negative value -802
>../../platforms/Cross/plugins/Squeak3D/b3dDraw.c:316:33: runtime error: left shift of negative value -114
>../../platforms/Cross/plugins/Squeak3D/b3dMain.c:829:61: runtime error: left shift of negative value -2
On OSX optimized VM, a crash happens in b3dMain.c, in function b3dAddBackFill at line 994 soon after those warnings
By protecting the shift with (unsigned) cast, this particular crash disappear.
There is still other crash happening related to bad fill list, but one thing at a time...