[Vm-dev] 'Run object as method' is flawed in VM
siguctua at gmail.com
Wed Dec 9 20:43:50 UTC 2009
2009/12/9 Michael van der Gulik <mikevdg at gmail.com>:
> On Wed, Dec 9, 2009 at 6:39 PM, Igor Stasenko <siguctua at gmail.com> wrote:
>> I tried to play with this feature and found that if i install a
>> smallinteger into method dictionary as a method
>> and then try to invoke that method, my VM is crashing.
>> self class methodDict at: #answer10 put: 10.
>> self should: [self answer10] raise: MessageNotUnderstood.
>> self class basicRemoveSelector: #answer10.
> Is this a feature that I don't know about? What is the expected behaviour?
> I'd expect the VM to crash or fail if it tries to execute an object
> rather than bytecodes.
This is very useful feature in a sense that it fills the gaps in VM
security and, in fact, in useful manner.
A method dictionary can be invalid, can be missing AND can contain an
arbitrary objects as methods.
VM should not crash under any of those circumstances.
Igor Stasenko AKA sig.
More information about the Vm-dev