[Pharo-dev] Reproducible VM Crash using UFFI

Jan Vrany jan.vrany at fit.cvut.cz
Sun Oct 8 07:32:15 EDT 2017


> So I think we are talking about different things here. I don't want
> to
> save "bad memory block" errors nor dream about bullet proof VM, but
> if
> we know the bullet then let's use a nice bulletproof vest :)
> 

This can be done and has been done. 

Following code would clearly result in segmentation violation: 

bytes := ExternalBytes address: 16r10 size: 100.
bytes byteAt: 1 put: 10.

There are smalltalk implementations out there that handle
this and open a (smalltalk) debugger (see the screenshot). 
Of course, you can just abort, fix your code and 
try again. 

Of course, if you happen to overwrite your object memory
or VM internal structures, you're screwed. 

As you said, you can still be shot and die, but the west can 
save your life in some cases :-)

Best, Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 032.png
Type: image/png
Size: 86967 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171008/3eaa589a/attachment.png>


More information about the Pharo-dev mailing list