[Vm-dev] Re: SegmentationFault in with OmniBrowser

tim Rowledge tim at rowledge.org
Tue May 22 15:10:28 UTC 2007


On 22-May-07, at 7:23 AM, Damien Cassou wrote:

>
>
> Much clearer :-) However, when methods access a non existing instance
> variable, I think it should not crash the VM with a segfault.

Lovely idea. But....
Building bytecodes is just like using assembler; you can corrupt  
anything. Normally the compiler generates the correct, safe, code but  
if you're using some other tool that can be persuaded to pop the  
stack and save to x'th instance var ofan object that has only x-1,  
then you're in trouble because you've almost certainly stomped on the  
header of the next object in memory. Sure, we could make the basic  
routines check the bounds every time. Care to imagine the performance  
impact?

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Ornerythologists study bad tempered birds




More information about the Vm-dev mailing list