xcalloc called from signal handler

Peter Hutterer mailinglists at who-t.net
Tue Feb 5 00:01:08 PST 2008


Matthieu Herrb wrote:
> Hi,
> 
> As far as I know the malloc() family of function is not async-signal
> safe on most of the systems that X.Org supports (including Linux,
> Solaris and *BSD).
> 
> 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.
> 
> Unfortunatly I don't really know enough about Xinput to provide a proper
> fix. The patch I'm attaching here is just a ugly hack to fix the issue
> for the short term.


A bit late but I have committed your patch. I need to check whether
there are other allocs during the event generation but this was the main
bunch.

Thanks! sorry about the delay.

Cheers,
    Peter






More information about the xorg mailing list