[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] pushRcvr fails for context instances whose sender has been set to an Integer instance (Issue #654)

Christoph Thiede notifications at github.com
Sat Sep 17 19:31:24 UTC 2022


Example to reproduce (in Squeak):

```smalltalk
(Context basicNew: 16) privSender: 1; pc
```

For me, this reproducibly crashes the VM.

<details><summary>Stack backtrace</summary><pre><code>        [00007ff7460a73f7] ??? + 0x173f7 in SqueakConsole.exe
        [00007ff7465372cc] Cog method with nil selector + 0xbc in CogCode
        [00007ff746401520] ceReturnToInterpreterTrampoline + 0x0 in CogCode
        [00007ff7478f04f6] ??? + 0x0 in (null)
        [00007ff7478f09e8] ??? + 0x0 in (null)
        [00007ff746498543] Cog method with nil selector + 0x213 in CogCode
        [00007ff746402906] on:do: + 0xa6 in CogCode
        [00007ff746401520] ceReturnToInterpreterTrampoline + 0x0 in CogCode
        [00007ff746401550] ceBaseFrameReturnTrampoline + 0x0 in CogCode</code></pre></details>

Other examples:

```smalltalk
(Context basicNew: 16) privSender: 1; method. "nil -- doesn't crash"
(Context basicNew: 16) privSender: 1; receiver. "nil -- doesn't crash"
(Context basicNew: 16) privSender: 1; sender. "crashes!"
(Context basicNew: 16) privSender: 1; isMorph. "false - doesn't crash"
(Context basicNew: 16) privSender: 1; yourself. "aContext - beware! crashes one or two seconds later without a backtrace"
```

Unless the context instance is executed by the VM, this should not happen. This is an annoying limitation for "heap fuzzing", i.e., randomly creating and assigning object instances, as done in SimulationStudio, for instance.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/654
You are receiving this because you are subscribed to this thread.

Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/654 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20220917/cb358cb1/attachment.html>


More information about the Vm-dev mailing list