[Vm-dev] Re: SegmentationFault in with OmniBrowser

Philippe Marschall philippe.marschall at gmail.com
Tue May 22 18:11:33 UTC 2007

2007/5/22, tim Rowledge <tim at rowledge.org>:
> On 22-May-07, at 10:56 AM, Philippe Marschall wrote:
> >
> > Java has a bytecode verifyer to prevent these problems with zero
> > runtime cost (if you don't count class loading). Squeak could have the
> > same.
> Absolutely irrelevant to the problem in question. Smalltalk has a
> 'bytecode verifier' too - it's called the compiler. It too makes sure
> the bytecodes are suitable as it 'loads' them.
> The problem is that if some *other* tool is generating bytecodes it
> can make 'bad' ones that will stomp over other objects. Just as in
> java you could etc etc. At least, I assume java could have a tool to
> generate bytecodes and run them? I wouldn't really know, never having
> had anything to do with it.

No, the VM checks the bytecodes when they are loaded. Sure you can
produce nonsense bytecodes like in this case but the VM will detect
that and not load them. Since methods are not first class they can not
be modifyed at runtime (I'm not sure they can in VW which has
immutable objects) you can not have corrupt bytecodes. It just can't
happen in Java even if you write a broken compiler.


> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Gotta run, the cat's caught in the printer.

More information about the Vm-dev mailing list