[Gc] Re[2]: Avoid ABORT() in GC_log_printf

Henning Makholm makholm at octoshape.com
Tue Nov 20 10:39:21 PST 2012


On 2012-11-20 19:18, Kjetil Matheussen wrote:

> Maybe a configure option, like --ignore-abort, would be a good idea.

Simply _ignoring_ aborts doesn't make sense in itself. What do you think
the GC should do _instead_ of aborting if told to "ignore" aborts? Most
aborts in the GC source are for situations where something is on fire
and the GC cannot possibly continue providing its service with any kind
of confidence.

Go into a state where every GC_malloc returns NULL? I don't think that
would leave most applications better able to recover from the error.
And reliably unwinding the stack _exactly_ enough to return NULL from
the GC call deep inside which the abort was generated is going to be
something of a performance penalty even on the ordinary non-error
code paths.

> Also, I think it's quite drastic to call abort in GC_log_printf.

I can agree with that particular case, but ignoring ALL aborts because of
it seems to be a rather strong (and impossible) response.

-- 
Henning Makholm
Octoshape ApS


More information about the Gc mailing list