RFC: internal_error() change + abort()

Andrew Cagney ac131313@cygnus.com
Mon Jul 24 17:38:00 GMT 2000


Michael Snyder wrote:

> How do you decide when it's safe to NOT abort?
> Eg. if a malloc call fails, you're probably completely
> out of virtual memory.  Are you sure printf will work
> under such a circumstance?

Internal error asks for permission to abort.  If the user really does
want to continue they can (but they have been warned :-). 
internal_error() its self keeps an eye out for a re-entrant call (say
the printf failed) and will do a write() abort() in that case.

Of course, a lack of stack space is always fatal :-)

	Andrew


More information about the Gdb-patches mailing list