assert() does not call abort()
|Reported by:||pulkomandy||Owned by:||nobody|
|Has a Patch:||no||Platform:||All|
Description (last modified by )
Our implementation of assert() calls debugger(). POSIX says it should call abort(). http://pubs.opengroup.org/onlinepubs/9699919799/functions/assert.html
This would be useful to catch assertions from inside the application (by setting a SIGABRT handler). I wanted to use that in the WebKit testsuite to avoid the debug_server crash dialog, and save a crash report instead. However, the team is killed without having a chance to intercept anything (with or without disable_debugger()). The kill is done with SIGKILL which can't be intercepted with a signal handler.
I'm not sure how to do this while keeping the current functionality. Maybe the call to debugger() may happen in the default SIGABRT handler, or maybe we could call SIGABRT only when disable_debugger() was set. The latter is still not POSIX compliant, however.