GNOME Bugzilla – Bug 349829
gdm shouldn't malloc memory in signal handlers
Last modified: 2006-08-03 20:47:44 UTC
Hi, So i'm looking through the patches we apply in rawhide to GDM and I spotted one that should have been upstreamed a very long time ago. It removes some function calls that may malloc from within a signal handler. I'll attach below.
Created attachment 70156 [details] [review] don't call functions that malloc from within a signal handler. The slave_start_jmp_error_to_print variable could potentially be set to preallocated memory. I'm not sure the message is worth the effort though.
Do you think it would make sense to just simply stest if GDM_KEY_DEBUG is set and call syslog() with static strings in these cases, so we don't lose the debug information - but also avoid calling g_strdup-like functions? Just wondering...
well syslog isn't a "legal" function to call from a signal handler either, I don't think.
Yes, you are right. I've commited your patch to 2.14 and 2.15.