[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] pushRcvr fails for context instances whose sender has been set to an Integer instance (Issue #654)
notifications at github.com
Mon Sep 19 15:37:41 UTC 2022
Thanks for the reply! My concrete issue is not related to setting method to nil but to setting sender to an Integer. Kernel-eem.1489 looks logical, but I can still do `( asContextWithSender: 1) pc` to crash the VM.
I do understand that the way the VM treats Context instances is an important optimization, but can we maybe have an explicit contract for what an image must not not do with any (non-married) Context instances in order to prevent the VM from crashing? For instance, maybe: A Context's sender must be either nil or a (sub)instance of Context. A Context's stackp must be either nil or an Integer and it must be changed via primitiveStoreStackp only but not via primitiveSlotAtPut. Etc. ...
Such a contract would help me design my fuzzer in a way that keeps the VM alive. Additionally, we *could* consider checking the class of the argument in Context>>#privSender: et al (if this does not impact performance too much). What do you think? :)
Reply to this email directly or view it on GitHub:
You are receiving this because you are subscribed to this thread.
Message ID: <OpenSmalltalk/opensmalltalk-vm/issues/654/1251192098 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev