From owner-freebsd-stable@FreeBSD.ORG Fri Nov 24 11:10:30 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 461D716A5EA for ; Fri, 24 Nov 2006 11:10:30 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id C509743D5F for ; Fri, 24 Nov 2006 11:09:48 +0000 (GMT) (envelope-from freebsd-stable@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1GnYwV-0003kH-Qm for freebsd-stable@freebsd.org; Fri, 24 Nov 2006 12:10:04 +0100 Received: from wh58-703.st.uni-magdeburg.de ([141.44.198.73]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Nov 2006 12:10:03 +0100 Received: from jo_t by wh58-703.st.uni-magdeburg.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 24 Nov 2006 12:10:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Johannes Totz Date: Fri, 24 Nov 2006 12:00:47 +0100 Lines: 50 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: wh58-703.st.uni-magdeburg.de User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) Sender: news Subject: glabel leaking memory? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Nov 2006 11:10:30 -0000 Hi! Looks like geom_label is leaking some memory to the last sector used to store metadata. Lots of rubbish after the label: > 000ffe00h: 47 45 4F 4D 3A 3A 4C 41 42 45 4C 00 00 00 00 00 ; GEOM::LABEL..... > 000ffe10h: 02 00 00 00 74 65 73 74 00 00 00 00 F0 B4 BF BF ; ....test....ð´¿¿ > 000ffe20h: 02 00 00 00 00 00 10 00 00 00 00 00 00 93 07 28 ; .............“.( > 000ffe30h: 00 94 07 28 00 95 07 28 18 28 07 28 D4 F8 0B 28 ; .”.(.•.(.(.(Ôø.( > 000ffe40h: 01 00 00 00 F4 B1 BF BF 67 2C 05 28 39 4D 05 28 ; ....ô±¿¿g,.(9M.( > 000ffe50h: 18 28 07 28 F4 B1 BF BF 00 95 07 28 94 27 05 28 ; .(.(ô±¿¿.•.(”'.( > 000ffe60h: 37 67 1A 28 37 67 1A 28 00 95 07 28 A0 B1 BF BF ; 7g.(7g.(.•.( ±¿¿ > 000ffe70h: 06 00 00 00 43 00 00 00 0B 27 05 00 18 28 07 28 ; ....C....'...(.( > 000ffe80h: 50 A1 07 28 00 00 00 00 94 27 05 28 60 F9 07 28 ; P¡.(....”'.(`ù.( > 000ffe90h: 8C 71 0C 31 3B 1C 0C 28 94 27 05 28 4C 12 0C 28 ; Œq.1;..(”'.(L..( > 000ffea0h: 7B B9 04 08 03 00 00 00 13 B2 BF BF 01 00 00 00 ; {¹.......²¿¿.... > 000ffeb0h: 00 30 05 08 0B 27 05 01 18 28 07 28 04 00 00 00 ; .0...'...(.(.... > 000ffec0h: 00 00 00 00 84 B2 BF BF 94 27 05 28 93 88 04 08 ; ....„²¿¿”'.(“ˆ.. > 000ffed0h: BC 0F 0C 28 00 95 07 28 9D D9 10 28 60 D1 18 28 ; ¼..(.•.(Ù.(`Ñ.( > 000ffee0h: 21 0B 00 00 0B 27 05 01 18 28 07 28 D0 A0 07 28 ; !....'...(.(Ð .( > 000ffef0h: 00 00 00 00 B4 B2 BF BF CB 28 05 28 93 88 04 08 ; ....´²¿¿Ë(.(“ˆ.. > 000fff00h: C4 49 3C 07 00 95 07 28 01 00 00 00 60 D1 18 28 ; ÄI<..•.(....`Ñ.( > 000fff10h: 00 F0 04 08 10 00 00 00 00 95 07 28 2F D3 16 01 ; .ð.......•.(/Ó.. > 000fff20h: C4 49 3C 07 93 88 04 08 18 28 07 28 F0 85 04 08 ; ÄI<.“ˆ...(.(ð….. > 000fff30h: 00 00 00 00 44 B3 BF BF A2 29 05 28 08 08 07 28 ; ....D³¿¿¢).(...( > 000fff40h: 18 B3 BF BF 01 00 00 00 1C B3 BF BF 00 00 00 00 ; .³¿¿.....³¿¿.... > 000fff50h: 00 90 07 28 00 91 07 28 00 92 07 28 00 93 07 28 ; ..(.‘.(.’.(.“.( > 000fff60h: 00 94 07 28 00 95 07 28 00 00 00 00 00 00 00 00 ; .”.(.•.(........ > 000fff70h: 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 ; ................ > 000fff80h: 00 00 00 00 00 00 00 00 00 95 07 28 05 00 00 01 ; .........•.(.... > 000fff90h: C4 49 3C 07 93 88 04 08 00 95 07 28 D0 B2 BF BF ; ÄI<.“ˆ...•.(в¿¿ > 000fffa0h: 07 00 00 00 06 00 00 00 00 00 00 00 00 00 00 00 ; ................ > 000fffb0h: 00 00 00 00 1D 29 05 28 18 28 07 28 F0 85 04 08 ; .....).(.(.(ð….. > 000fffc0h: 01 00 00 00 74 B3 BF BF 67 2C 05 28 39 4D 05 28 ; ....t³¿¿g,.(9M.( > 000fffd0h: 18 28 07 28 74 B3 BF BF C7 4E 05 28 00 D0 07 28 ; .(.(t³¿¿ÇN.(.Ð.( > 000fffe0h: 93 88 04 08 00 95 07 28 18 28 07 28 18 28 07 28 ; “ˆ...•.(.(.(.(.( > 000ffff0h: 84 D0 17 28 A4 B3 BF BF C8 2D 05 28 C4 6D 07 28 ; „Ð.(¤³¿¿È-.(Äm.( The buffer in sbin/geom/class/label/geom_label.c:label_label(...) is allocated from the stack but never initialized with zeros. Does anybody consider this a bug? Didn't find any PR for it. A simple memset() should fix it... BTW: code documentation is pretty bad... Cheers, Johannes