2009/12/9 Michael van der Gulik mikevdg@gmail.com:
On Wed, Dec 9, 2009 at 6:39 PM, Igor Stasenko siguctua@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.
testCrashWithSmallInt 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.
Gulik.