[Vm-dev] Class checks in the vm

Eliot Miranda eliot.miranda at gmail.com
Tue Apr 17 16:31:09 UTC 2012


On Tue, Apr 17, 2012 at 9:20 AM, Stefan Marr <smalltalk at stefan-marr.de>wrote:

>
> Hi Eliot:
>
> On 17 Apr 2012, at 18:13, Eliot Miranda wrote:
>
> > Smalltalk is a safe language; it is extremely important that the system
> not crash and instead provide walkbacks that afford diagnosis of errors.
>
> Since when is that? Didn't you tell me that if I do something stupid with
> a primitive, I have to expect that it crashes?
>

Most of the time the system is safe.  One has to think a little to get it
to crash (thisContext swapSender: 1 at 2).  But in normal use it doesn't crash
('abc' at: 1 put: 1 at 2).


> And the last time I checked, the store bytecode didn't do any length
> checks either, so it is easily possible to forge a method that writes into
> random memory, no?
>

Yes, there are many ways to crash the VM.  But its not so bad right now
(there are lots of safe primitives and the system is much safer than e.g.
C), and it's getting better (e.g. I just plugged a gap in objectAt:put:),
but it is a tricky balance between performance and safety.  For me, its
some judgement call on common usage.  But its certainly up for debate.



>
> Best regards
> Stefan
>
>
> --
> Stefan Marr
> Software Languages Lab
> Vrije Universiteit Brussel
> Pleinlaan 2 / B-1050 Brussels / Belgium
> http://soft.vub.ac.be/~smarr
> Phone: +32 2 629 2974
> Fax:   +32 2 629 3525
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120417/5fb95695/attachment.htm


More information about the Vm-dev mailing list