xcalloc called from signal handler
Bernardo Innocenti
bernie at codewiz.org
Sun Dec 16 15:48:09 PST 2007
Matthieu Herrb wrote:
> Unfortunalty the xserver 1.4 new Xinput code calls xcalloc() in
> functions that are called by the SIGIO handler. This has been identified
> as the cause of many X server segfaults on OpenBSD, and will probably
> also cause random problems on other systems.
I've observed such problems on Linux too, when you try to quit the X server
through SIGINT.
+ /* Preallocate xEvent store */
+ if (!xf86Events)
+ xf86Events = (xEvent *)xcalloc(sizeof(xEvent), GetMaximumEventsNum());
+ if (!xf86Events)
+ FatalError("Couldn't allocate event store\n");
The error message is never going to show up because xcalloc() is
supposed to automatically abort() on failure.
--
\___/
|___| Bernardo Innocenti - http://www.codewiz.org/
\___\ One Laptop Per Child - http://www.laptop.org/
More information about the xorg
mailing list