From owner-freebsd-ports Sun Feb 24 16:20: 7 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6C15037B405 for ; Sun, 24 Feb 2002 16:20:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1P0K1O44444; Sun, 24 Feb 2002 16:20:01 -0800 (PST) (envelope-from gnats) Received: from mta1.srv.hcvlny.cv.net (mta1.srv.hcvlny.cv.net [167.206.5.4]) by hub.freebsd.org (Postfix) with ESMTP id CD83B37B402 for ; Sun, 24 Feb 2002 16:17:15 -0800 (PST) Received: from ool-182f9041.dyn.optonline.net (ool-182f9041.dyn.optonline.net [24.47.144.65]) by mta2.srv.hcvlny.cv.net (iPlanet Messaging Server 5.0 Patch 2 (built Dec 14 2000)) with ESMTP id <0GS20038BBH06P@mta2.srv.hcvlny.cv.net> for FreeBSD-gnats-submit@freebsd.org; Sun, 24 Feb 2002 19:17:25 -0500 (EST) Message-Id: <20020224191420.E8289-100000@localhost> Date: Sun, 24 Feb 2002 19:17:09 -0500 (EST) From: Andriy Gapon To: FreeBSD-gnats-submit@freebsd.org Subject: ports/35288: ports/afterstep has resources leak Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35288 >Category: ports >Synopsis: ports/afterstep has resources leak >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Feb 24 16:20:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: Andriy Gapon >Release: FreeBSD 4.5-RELEASE i386 >Organization: >Environment: System: FreeBSD edge.icyb.net 4.5-RELEASE FreeBSD 4.5-RELEASE #1: Thu Jan 31 13:29:05 EST 2002 avg@edge.icyb.net:/sys-devel/obj/sys-devel/src/sys/EDGE i386 >Description: each time a managed window is iconized a new icon window is created and the previous one is lost. This window leak is a serious bug itself, but it may result in even more serious consequences. Each decoration window created by afterstep for an application window has an associated context, which is in fact a pointer to an aftrstep window, ASWindow, object. For leaked icon windows context is never destroyed leading to potential access to memory region that is not a valid ASWindow, if application for which icon windows were created is terminated. The latter usually results in coredump, symptom of which was desribed in PR ports/34066 >How-To-Repeat: iconify/deiconify a window multiple times; using application based on XQueryTree on root window determine number of child-windows. it will be incremented after each iconification. Coredumps have a more probabilistic nature and usually happen if you have substantial number of leaked windows, their application is terminated and you havily use applications that create windows and then change their properties through configure requests, e.g. opening certain web-pages using netscape. >Fix: --- icons.c.patch begins here --- --- afterstep/icons.c.orig Wed Feb 13 18:54:47 2002 +++ afterstep/icons.c Wed Feb 13 18:58:13 2002 @@ -778,11 +778,13 @@ MoveResizePagerView(t); } } - - if(tmp_win->flags & ICON_MOVED) - CreateIconWindow(tmp_win,tmp_win->icon_x_loc,tmp_win->icon_y_loc); - else - CreateIconWindow(tmp_win, def_x, def_y); + + if(tmp_win->icon_pixmap_w == None) { + if(tmp_win->flags & ICON_MOVED) + CreateIconWindow(tmp_win,tmp_win->icon_x_loc,tmp_win->icon_y_loc); + else + CreateIconWindow(tmp_win, def_x, def_y); + } AutoPlace(tmp_win); tmp_win->flags |= ICONIFIED; --- icons.c.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message