[Vm-dev] Re: SegmentationFault in with OmniBrowser
John M McIntosh
johnmci at smalltalkconsulting.com
Tue May 22 15:26:24 UTC 2007
Well I did some work with the VW primitive interface, beyond the
disclaimer of saying if you use this interface you void all warrenty
support etc etc, we found
that the paranoid apis would check everything for validity, thus the
prim call would take *forever*, doing say a dot product sum was
outweight by many microseconds
by the code sanity checking the data items.
On May 22, 2007, at 8:10 AM, tim Rowledge wrote:
> 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 Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Ornerythologists study bad tempered birds
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Vm-dev