[ic] Mac OSX viable as a development platform?

Doug Alcorn interchange-users@interchange.redhat.com
Tue Mar 5 09:26:00 2002


Chris Devers <cdevers@cis.usouthal.edu> writes:

> FWIW, Interchange is the *only* program I've seen throw a segfault error
> on OSX. I've seen lots of crashes, to be sure, but nothing quite this
> Unixy had cropped up before now, and the lack of more verbose debug output
> has been very frustrating...

I'm not meaning to start a flame war here; just give a little
background.  In Unix you have the concept of "protected memory".  That
means every single byte of memory has permission bits that indicate
who has read, read/write, or no access.  Bad things happen when
programs are allowed to write on memory that's not there's.  That's
why your Mac OS 9 box would crash so much with IE.  The old Mac
allowed miss-behaving programs to have their way with what ever memory
they wanted.  In Unix, if you write (or even read) memory that is not
yours it's a fatal error.  Do not pass "Go", do not collect $200; your
program stops.  The good news is that when it dies it will almost
never take another application (or the OS) down with it.

All that to say a SEGFAULT is the name of the error for
reading/writing outside your memory.  So, when things SEGFAULT they
don't have a chance to produce any error.  They read/write outside
their memory space and the OS kills them.  Often they will "dump
core".  This core file is a snapshot of the memory space for the
application just before it dies.  A developer can look at the core
file in a debugger and determine where the program stepped out of its
memory space.  There are several reasons why a core file might not be
dumped.  One of those reasons is that the program doesn't have write
permissions to its working directory.  Another might be that the
system settings prevent core files.  There are some other reasons why
a core file might not dump, but I haven't traced it down to figure out
why yet.

Anyway, it doesn't solve your problem; but hopefully it will give you
some insight into what's happening.
-- 
 (__) Doug Alcorn (mailto:doug@lathi.net http://www.lathi.net)
 oo / PGP 02B3 1E26 BCF2 9AAF 93F1  61D7 450C B264 3E63 D543
 |_/  If you're a capitalist and you have the best goods and they're
      free, you don't have to proselytize, you just have to wait.