[PATCH] Don't call FatalError from the signal handler

Peter Hutterer 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."

http://bugs.freedesktop.org/show_bug.cgi?id=10212

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.

Cheers,
   Peter
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-dix-set-up-siglongjmp-to-jump-to-in-case-of-a-Fatal.patch.txt
URL: <http://lists.x.org/archives/xorg/attachments/20080430/4c42f4fb/attachment.txt>


More information about the xorg mailing list