[PATCH weston 1/2] weston: remove SEGV and ABRT handlers
daniel at fooishbar.org
Fri Feb 9 15:42:08 UTC 2018
On 7 February 2018 at 23:31, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> On Wed, Feb 07, 2018 at 12:03:56PM +0000, Simon McVittie wrote:
>> On Wed, 07 Feb 2018 at 12:51:14 +0200, Pekka Paalanen wrote:
>> > Catching an ABRT is kind of ok, catching a SEGV is russian roulette. We
>> > have been quite lucky with it, but I've started hitting crashes inside
>> > malloc() which causes a deadlock when our SEGV handler needs to malloc()
>> > as well (weston_log_timestamp()).
>> This isn't unique to SIGSEGV: inside any POSIX async-signal handler,
>> you can only (portably, safely) use functions that are documented to be
>> async-signal-safe, which basically means syscall wrappers. See
>> signal-safety(7) on a Linux system.
> fun fact: printf() is not in that list of functions. so printf() from within
> a signal handler may or may not go boom.
Yeah, it's basically just a terrible idea. Have reviewed and pushed
both patches from this, thanks!
More information about the wayland-devel