[PATCH] Don't call FatalError from the signal handler
mailinglists at who-t.net
Wed Apr 30 05:52:44 PDT 2008
Can I please have a review of the attached patch? The problem is
described in bug 10212.
Bernardo Innocenti reported:
"Very often I can freeze the Xorg server (git head) by typing
my username in the gdm editbox.
Looks like a segfault happened and xf86SigHandler is trying
to kill the server from _inside_ the SEGV signal handler,
thus deadlocking on the global malloc arena lock.
Calling free() (and many other libc functions) from signal
handlers is illegal according to POSIX."
The attached patch sets up a siglongjmp environment and - in case of a
fatal error during a signal - jumps back to the set up state before
bringing down the server.
This is the first time I venture into this area, so I'd like to get some
comments (and ACKs) on the patch before committing it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the xorg