http://svnweb.freebsd.org/base/head/lib/libc/stdlib/abort.c?...
And GNU glibc's abort():
http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=stdlib...
http://svnweb.freebsd.org/base/head/lib/libc/stdlib/abort.c?...
And GNU glibc's abort():
http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=stdlib...
* Writing to NULL
* Writing to address 1 (unaligned write)
* Writing to text space (read-only machine code)
* Dividing by 0
* More violence than SIGABRT (SIGILL, SIGBUS)
http://www.opensource.apple.com/source/Libc/Libc-262/stdlib/...
It's a bug in the spec, if anything. See the abort() spec http://pubs.opengroup.org/onlinepubs/009695399/functions/abo...
Vs the exit() spec http://pubs.opengroup.org/onlinepubs/000095399/functions/exi...
abort() is intended as a last-ditch effort. exit() is the one that attempts to flush all open buffered file descriptors, and should be used in lieu of abort except in cases where you know you're screwed, or explicitly want to throw a signal so a debugger can take a peek.