Re[2]: [Gc] Allowing SIGINT during garbage collection may result in deadlock

Ivan Maidanski ivmai at mail.ru
Tue Apr 20 01:31:18 PDT 2010


Tue, 20 Apr 2010 09:57:04 +0200 Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com>:

> 2010/4/20 Ivan Maidanski <ivmai at mail.ru>
> 
> >
> > Most GC functions are not re-entrant (e.g. which do locking), so if you
> > call a GC function from an async signal, you should do signal blocking
> > (deferring) in every non-reentrant GC API function (instead of doing it for
> > garbage collections), right?
> >
> 
> It is not safe to call _almost_ _any_ function from a signal handler, not
> even malloc()
> 
> http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html#tag_02_04
> Signal handlers are useless in that respect, except for sending messages to
> threads that actually do the job.

So, mono is broken in this respect.

> 
> Please do not make the garbage collector block signals by default.

Agreed not to do it ;)

> 
> Juanjo



More information about the Gc mailing list