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 592742 - Avoid accessing freed memory when being replaced
Avoid accessing freed memory when being replaced
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2009-08-22 19:58 UTC by Owen Taylor
Modified: 2009-08-24 18:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Avoid accessing freed memory when being replaced (1.60 KB, patch)
2009-08-22 19:58 UTC, Owen Taylor
reviewed Details | Review

Description Owen Taylor 2009-08-22 19:58:52 UTC
If we are replaced via the window manager selection, then we close
the MetaDisplay before meta_finalize() runs. We should be careful
not to try to close the display again (and access already freed
memory) in that case, so clear the global 'the_display' variable.

See Metacity bug http://bugzilla.gnome.org/show_bug.cgi?id=588119
Comment 1 Owen Taylor 2009-08-22 19:58:54 UTC
Created attachment 141448 [details] [review]
Avoid accessing freed memory when being replaced
Comment 2 Dan Winship 2009-08-23 00:35:53 UTC
i'm guessing bug 591171 is a dup of this?
Comment 3 Owen Taylor 2009-08-24 00:48:27 UTC
If gnome-shell is segfaulting when replaced, it might well be this issue, but I think bug 591171 is more about two other things:

 * gnome-shell shouldn't try to respawn metacity if it gets replaced
 * It would be nice if gnome-shell respawned the gnome-shell it replaced
   to help developing gnome-shell under gnome-shell.
Comment 4 Tomas Frydrych 2009-08-24 07:52:31 UTC
Comment on attachment 141448 [details] [review]
Avoid accessing freed memory when being replaced

Looks good, please commit.
Comment 5 Owen Taylor 2009-08-24 18:30:08 UTC
Pushed