[prev] [thread] [next] [lurker] [Date index for 2007/01/29]
On Sun, Jan 28, 2007 at 10:04:14AM +0200, Yossi Kreinin wrote: > Exceptions and error codes aside, people who trap SIGSEGV should be shot. Unless what they're writing is a debugging aid, and they're not using C. If you're using C then obviously you should just dump core, as that will contain all the information you need. However, if you're writing in some other language, if you let it dump core then it'll dump (for instance) the state of a mind-bogglingly complex interpreter, with who-knows-what going on inside it, with whose internals you are not familiar. Of course, if you can make the interpreter segfault* then you've found a bug in it but generally it's more important to code around that bug cos it'll take god knows how long to get it fixed - not to mention the political shenanigans involved in upgrading an interpreter in a lot of places. But anyway, in those cases, catching SIGSEGV and spitting out your own diagnostics *and then halting, immediately* is a Very Good Idea. * yes perl, I'm looking at you. -- David Cantrell | Nth greatest programmer in the world The test of the goodness of a thing is its fitness for use. If it fails on this first test, no amount of ornamentation or finish will make it any better, it will only make it more expensive and foolish. -- Frank Pick, lecture to the Design and Industries Assoc, 1916There's stuff above here
Generated at 23:01 on 06 Feb 2007 by mariachi 0.52