This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Why can't I LD_PRELOAD __assert_fail ?
On 18 February 2011 04:25, Jeffrey Walton wrote:
> I could never understand
> why POSIX specified that a program should abort after an assert
> (http://pubs.opengroup.org/onlinepubs/009695399/functions/assert.html).
POSIX probably says that because C says that, and every implementation
does that, and standardising anything different would have been
incompatible with actual implementations.
That's what assert does, it aborts the program if the assertion fails.
If you want a different behaviour, don't use assert.