After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 349829 - gdm shouldn't malloc memory in signal handlers
gdm shouldn't malloc memory in signal handlers
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-03 19:28 UTC by Ray Strode [halfline]
Modified: 2006-08-03 20:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
don't call functions that malloc from within a signal handler. (862 bytes, patch)
2006-08-03 19:29 UTC, Ray Strode [halfline]
none Details | Review

Description Ray Strode [halfline] 2006-08-03 19:28:10 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.
Comment 1 Ray Strode [halfline] 2006-08-03 19:29:55 UTC
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.
Comment 2 Brian Cameron 2006-08-03 20:10:26 UTC
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...


Comment 3 Ray Strode [halfline] 2006-08-03 20:41:45 UTC
well syslog isn't a "legal" function to call from a signal handler either, I don't think.
Comment 4 Brian Cameron 2006-08-03 20:47:44 UTC
Yes, you are right.  I've commited your patch to 2.14 and 2.15.