I have been chasing a memory leak in my Xserver on Fedora core 1 through 3. This problem is present on both XFree86 and the xorg release in Fedora 3. If a cursor theme is enabled, the attached test programs will produce a leak in the X server. The C program (leak.c) leaks only when it is running. membug2 will allocate memory that stays allocated after the program terminates (try an argument of 500), however, you can shrink the allocation back down by running it with a small argument (like 1). membug will allocate memory in the server and never give it back no matter what you do (push the button a bunch of times). When I disable the theme as follows, the memory leak totally goes away: cd /usr/share/icons/default mv index.theme index.theme.save Ctrl-Alt-Bksp Here are some other posts to the TCL and Redhat bugzillas: https://bugzilla.redhat.com/beta/show_bug.cgi?id=150747 http://sourceforge.net/tracker/index.php?func=detail&aid=1157298&group_id=10894&atid=110894
Created attachment 2109 [details] Demonstrates leak
Created attachment 2110 [details] Another demo script
Created attachment 2111 [details] Another demo script
Created attachment 8286 [details] [review] Fix 3 leaks triggered by the testcase and GTK+
commit 073eb2c56f4794275eee40a825dbfe1232bb2690 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Apr 1 12:14:51 2011 +0100 Free list on shutdown. We freed the parent structure without freeing the list contained within, making valgrind unhappy. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> commit f49e7e1608f2dac140f60bcae21d5c37f79fc41b Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Apr 1 12:15:46 2011 +0100 Free the partial header after failing to open the cursor. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> commit bee68e54e5c3a4b9f46c81366a720531e3e07a82 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Apr 1 12:16:23 2011 +0100 Free the FontInfo structure after loading the cursor from it. References: https://bugs.freedesktop.org/show_bug.cgi?id=2731 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.