<p></p>
<p dir="auto">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 <code class="notranslate">([] asContextWithSender: 1) pc</code> to crash the VM.</p>
<p dir="auto">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. ...</p>
<p dir="auto">Such a contract would help me design my fuzzer in a way that keeps the VM alive. Additionally, we <em>could</em> consider checking the class of the argument in Context>>#privSender: et al (if this does not impact performance too much). What do you think? :)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/654#issuecomment-1251192098">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AIJPEWZ7OSNO6GEDW75RW5LV7CCELANCNFSM6AAAAAAQPD7WBU">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AIJPEW46326WR6FSKJXI2CDV7CCELA5CNFSM6AAAAAAQPD7WBWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSKSOWSE.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><OpenSmalltalk/opensmalltalk-vm/issues/654/1251192098</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/654#issuecomment-1251192098",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/654#issuecomment-1251192098",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>