Segmentation faults and friends.
John M McIntosh
johnmci at smalltalkconsulting.com
Tue Mar 28 18:13:00 UTC 2006
If you look at the VisualWorks source code you'll see it's much more
paranoid about things and the test flavor does asserts *everywhere*
to confirm sanity so with it it's less likely to die if you do
something clever, still developers from time to time come up with
cleverer code so to speak.
For the most part the Squeak VM does not do sufficient error
checking, that said usually the errors encountered are related to
platform support code, any such GPF, Seg Faults etc should be
reported in Mantis, and of course I welcome the chance to look at any
os-x crash logs.
On 27-Mar-06, at 10:18 PM, Michael van der Gulik wrote:
> Hi all.
> This is a rather philosophical question: is it a bug if the VM
> crashes, showing either a General Protection Fault, Segmentation
> Fault and core dump, or whatever the local operating system does?
> I've discovered a few ways of generating segmentation faults (under
> Linux) using Squeak. One was playing around with CompiledMethods; I
> accidently broke a literal reference such that when the garbage
> collector ran, Squeak crashed.
> This may or may not be a bug depending on whether you want to add
> bounds checking to the garbage collector, which may have a
> performance penalty.
> Another way is the following, done in the workspace:
> b := BlobMorph class.
> m := Metaclass new.
> m superclass: (b superclass) methodDictionary: (b methodDictionary)
> format: 2.
> t := m new.
> t class printIt.
> In this case, format is invalid. It should be 152. Here, I was just
> being stupid.
> So the question, again, is: should the VM *never* crash and protect
> against very curious, stupid programmers like myself, or should it
> work fine until the programmer becomes curious and stupid?
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
More information about the Squeak-dev