Report forwarded to debian-bugs-dist@lists.debian.org, Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>:
Bug#47214; Package dpkg.   debian-bugs-dist@lists.debian.orgIan Jackson and others  Subject: Bug#47214: dpkg: Memleak in libdpkg when using parseversion() (lib/parsehelp.c) Reply-To: , 47214@bugs.debian.org Resent-From: Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Ian Jackson and others Resent-Date: Tue, 12 Oct 1999 13:18:01 GMT Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: report 47214 X-Debian-PR-Package: dpkg X-Debian-PR-Keywords: X-Loop: owner@bugs.debian.org Received: via spool by bugs@bugs.debian.org id=B.93973361117555 (code B ref -1); Tue, 12 Oct 1999 13:18:01 GMT From: To: submit@bugs.debian.org X-Mailer: bug 3.2.2 Message-Id: Date: Tue, 12 Oct 1999 23:03:20 +1000 Package: dpkg Version: 1.4.1.13 Severity: wishlist parseversion calls nfstrsave which is a strdup() clone which calls nfmalloc(), dpkg's non-freeing malloc. When using a cmpversions() based on dpkg's (see main/enquire.c) in a long lived process that does a lot of comparisons, all this memory is completely wasted. The program I'm working loses a good 3MB every 5s or so thanks to this. (What can I say? I do a lot of version comparisons) A workaround is to use libapt-pkg's version comparison stuff instead, which doesn't leak memory in any noticable amount. Something like: #include extern "C" { int cmpversions(char *left, char *op, char *right) { int i = pkgVersionCompare(left, right); if (!strcmp(op, "<=")) return i <= 0; if (!strcmp(op, ">=")) return i >= 0; if (!strcmp(op, "<<")) return i < 0; if (!strcmp(op, ">>")) return i > 0; if (!strcmp(op, "=")) return i == 0; } } in a C++ source file gives similar behaviour to the original (although it returns 1/0 for true/false (C-style) instead of 0/1 (shell style), and doesn't handle as many operators, or error conditions). Cheers, aj -- System Information Debian Release: potato Kernel Version: Linux azure 2.0.33 #1 Fri May 15 19:45:40 EST 1998 i586 unknown Versions of the packages dpkg depends on: ii libc6 2.1.2-0pre12 GNU C Library: Shared libraries and timezone ii libncurses4 4.2-3.2 Shared libraries for terminal handling ii libstdc++2.10 2.95.1-1 The GNU stdc++ library   Acknowledgement sent to <aj@azure.humbug.org.au>:
New Bug report received and forwarded. Copy sent to Ian Jackson and others <dpkg-maint@chiark.greenend.org.uk>.   -t  From: owner@bugs.debian.org (Debian Bug Tracking System) To: Subject: Bug#47214: Acknowledgement (dpkg: Memleak in libdpkg when using parseversion() (lib/parsehelp.c)) Message-ID: In-Reply-To: References: X-Debian-PR-Message: ack 47214 Thank you for the problem report you have sent regarding Debian. This is an automatically generated reply, to let you know your message has been received. It is being forwarded to the developers mailing list for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): Ian Jackson and others If you wish to submit further information on your problem, please send it to 47214@bugs.debian.org (and *not* to bugs@bugs.debian.org). Please do not reply to the address at the top of this message, unless you wish to report a problem with the Bug-tracking system. Darren Benham (administrator, Debian Bugs database)   Received: (at submit) by bugs.debian.org; 12 Oct 1999 13:06:51 +0000 Received: (qmail 17380 invoked from network); 12 Oct 1999 13:06:47 -0000 Received: from azure.humbug.org.au (mail@203.24.22.40) by master.debian.org with SMTP; 12 Oct 1999 13:06:47 -0000 Received: from aj by azure.humbug.org.au with local (Exim 3.03 #1 (Debian)) id 11b1aK-0002t4-00; Tue, 12 Oct 1999 23:03:20 +1000 From: Subject: dpkg: Memleak in libdpkg when using parseversion() (lib/parsehelp.c) To: submit@bugs.debian.org X-Mailer: bug 3.2.2 Message-Id: Date: Tue, 12 Oct 1999 23:03:20 +1000 Package: dpkg Version: 1.4.1.13 Severity: wishlist parseversion calls nfstrsave which is a strdup() clone which calls nfmalloc(), dpkg's non-freeing malloc. When using a cmpversions() based on dpkg's (see main/enquire.c) in a long lived process that does a lot of comparisons, all this memory is completely wasted. The program I'm working loses a good 3MB every 5s or so thanks to this. (What can I say? I do a lot of version comparisons) A workaround is to use libapt-pkg's version comparison stuff instead, which doesn't leak memory in any noticable amount. Something like: #include extern "C" { int cmpversions(char *left, char *op, char *right) { int i = pkgVersionCompare(left, right); if (!strcmp(op, "<=")) return i <= 0; if (!strcmp(op, ">=")) return i >= 0; if (!strcmp(op, "<<")) return i < 0; if (!strcmp(op, ">>")) return i > 0; if (!strcmp(op, "=")) return i == 0; } } in a C++ source file gives similar behaviour to the original (although it returns 1/0 for true/false (C-style) instead of 0/1 (shell style), and doesn't handle as many operators, or error conditions). Cheers, aj -- System Information Debian Release: potato Kernel Version: Linux azure 2.0.33 #1 Fri May 15 19:45:40 EST 1998 i586 unknown Versions of the packages dpkg depends on: ii libc6 2.1.2-0pre12 GNU C Library: Shared libraries and timezone ii libncurses4 4.2-3.2 Shared libraries for terminal handling ii libstdc++2.10 2.95.1-1 The GNU stdc++ library   Changed Bug title. Request was from Martin Quinson <mquinson@ens-lyon.fr> to control@bugs.debian.org.   Received: (at control) by bugs.debian.org; 15 Sep 2003 16:01:59 +0000 From mquinson@ens-lyon.fr Mon Sep 15 11:01:56 2003 Return-path: Received: from wifi247.wlan.ens-lyon.fr (localhost) [140.77.32.247] by master.debian.org with esmtp (Exim 3.35 1 (Debian)) id 19yvnY-0007uH-00; Mon, 15 Sep 2003 11:01:56 -0500 Received: from mquinson by localhost with local (Exim 3.36 #1 (Debian)) id 19yvnX-000169-00; Mon, 15 Sep 2003 18:01:55 +0200 Date: Mon, 15 Sep 2003 18:01:55 +0200 To: control@bugs.debian.org Cc: debian-dpkg@lists.debian.org Subject: More tagging Message-ID: <20030915160155.GA4781@galadriel> References: <20030915075700.GP4781@galadriel> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.4i From: Martin Quinson Delivered-To: control@bugs.debian.org X-Spam-Status: No, hits=0.0 required=4.0 tests=none version=2.53-bugs.debian.org_2003_9_14 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_9_14 (1.174.2.15-2003-03-30-exp) retitle 157437 [TRIVIAL] dpkg: double ChangeLog retitle 74259 [PERF] dpkg: a couple of memory leaks [PATCH] retitle 139838 [PERF] dpkg: package database hash size too small retitle 160447 [PERF] reminder: fix use of strncpy in parsedb() retitle 206416 [PERF] dpkg package hash table insufficient retitle 149760 [PERF] dpkg: should use something faster than text files retitle 179296 [PERF] patch: database speedup using flex retitle 47214 [PERF] memleak in libdpkg when using parseversion() (lib/parsehelp.c) retitle 69192 [PERF] dpkg database is a bit slow retitle 157060 [PERF] dpkg out of memory errors on 24M ram retitle 4448 [PERF] dselect performance gripe (disk method doing dpkg -iGROEB) retitle 159381 [PERF] dselect: memory leaks (valgrind does its job ;) retitle 192102 [INTL:pt] dselect: cosmetic problem, item 3 on pt_BR retitle 192972 [INTL:da] dselect: Danish translation of dselect retitle 195303 [INSTALL-INFO] gettext: info gettextize just repeats the man page retitle 170953 [MD5SUM] dpkg: md5um crash thanks Note that 160447 and 206416 are pending, but I did rename them anyway. I guess that's not an issue. From what you say in 159381, it is pending (or already fixed). 195303 may deserve a better title, but I cannot find any right now. Bye, Mt. -- Le sens commun n'est pas si commun. -- Voltaire [Common sense is not so common]   Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Developers <debian-dpkg@lists.debian.org>:
Bug#47214; Package dpkg.   debian-bugs-dist@lists.debian.orgDpkg Developers  X-Loop: owner@bugs.debian.org Subject: Bug#47214: Invisible wireless earpiece! Reply-To: =?UTF-8?Q?=D0=94=D0=B0=D1=80=D1=8C?= =?UTF-8?Q?=D1=8F=D0=93=D0=B8=D0=BB=D0=B5=D0=BC=D0=B4=D0=B6=D0=B0=D0=BD?= <|agent1@sensis.com.au>, 47214@bugs.debian.org Resent-From: =?UTF-8?Q?=D0=94=D0=B0=D1=80=D1=8C?= =?UTF-8?Q?=D1=8F=D0=93=D0=B8=D0=BB=D0=B5=D0=BC=D0=B4=D0=B6=D0=B0=D0=BD?= <|agent1@sensis.com.au> Resent-To: debian-bugs-dist@lists.debian.org Resent-CC: Dpkg Developers Resent-Date: Mon, 08 Sep 2008 16:03:42 +0000 Resent-Message-ID: Resent-Sender: owner@bugs.debian.org X-Debian-PR-Message: followup 47214 X-Debian-PR-Package: dpkg X-Debian-PR-Keywords: X-Debian-PR-Source: dpkg Received: via spool by 47214-submit@bugs.debian.org id=B47214.122088964323807 (code B ref 47214); Mon, 08 Sep 2008 16:03:42 +0000 Received: (at 47214) by bugs.debian.org; 8 Sep 2008 16:00:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rietz.debian.org X-Spam-Level: *** X-Spam-Status: No, score=3.6 required=4.0 tests=MULTALT,NEXTPART,RDNS_DYNAMIC autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Received: from 189-015-88-202.xd-dynamic.ctbcnetsuper.com.br ([189.15.88.202] helo=OLIVIA) by rietz.debian.org with esmtp (Exim 4.63) (envelope-from <|agent1@sensis.com.au>) id 1KcjAP-0005NV-HR; Mon, 08 Sep 2008 16:00:42 +0000 Received: from [189.15.88.202] by mail12.sen-net.net; Mon, 8 Sep 2008 13:00:41 -0300 From: =?UTF-8?Q?=D0=94=D0=B0=D1=80=D1=8C?= =?UTF-8?Q?=D1=8F=D0=93=D0=B8=D0=BB=D0=B5=D0=BC=D0=B4=D0=B6=D0=B0=D0=BD?= <|agent1@sensis.com.au> To: <44039@bugs.debian.org> Date: Mon, 8 Sep 2008 13:00:41 -0300 Message-ID: <01c911b2$e58f6280$ca580fbd@|agent1> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01C911B2.E58F6280" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2905 Importance: Normal This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C911B2.E58F6280 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit EXAMS AND NEGOTIATIONS – NO PROBLEM – EXAMENES Y CONVERSACIONES ENGLISH ESPANOL Special equipment, used by presidents, spies and celebrities! The lastest highest class equipment - now available for you! Invisible wireless earpiece! Exams, negotiations, courts, security, TV – successful work without preparation with assistance of micro-earpiece. For the first time now - lastest technologies in free sale – trustable (lifetime guaranty), easy in use earpieces series WINTEC DIGITAL – we guarantee nobody has them in the world!!! Excellent, stylish and useful gift!!! Equipo especial que usan presidentes, espias y estrellas! Ultima tecnologia de alta clase – ahora prara Usted! Microaudifono inalambrico invisible! Examenes, conversaciones, conferencias, juicios, servicios de seguridad y TV – trabajo exitoso sin preparacion con la ayuda del microaudifono! Por primera vez en el mundo – ultimas tecnologias en venta libre – seguros (garantia de por vida), simples de usarse microaudifonos de la serie WINTEC DIGITAL – garantizado nadie mas en el mundo los tiene!!! Excelente, moderno y util regalo!!! +7(495) 510-20-19 ------=_NextPart_000_000E_01C911B2.E58F6280 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
EXAMS= AND NEGOTIATIONS
=96 NO PROBLEM =96
EXAMENES Y CONVERSACIONES
ENGLISH<= /span>
ESPANOL<= /span>
Special eq= uipment, used by presidents, spies and celebrities! The lastest highe= st class equipment - now available for you!

Invisible wireless earpiece!

Exams, negotiations, courts, secu= rity, TV =96 successful work without preparation with assistance of mi= cro-earpiece.

For the first time now - lastest= technologies in free sale =96 trustable (lifetime guaranty), easy in = use earpieces series WINTEC DIGITAL =96 we guarantee nobody has them i= n the world!!!

Excellent, stylish and useful gift!= !!

Equipo esp= ecial que usan presidentes, espias y estrellas! Ultima tecnologia de a= lta clase =96 ahora prara Usted!

Microaudifono inalambrico invisib= le!

Examenes, conversaciones, confere= ncias, juicios, servicios de seguridad y TV =96 trabajo exitoso sin pr= eparacion con la ayuda del microaudifono! =

Por primera vez en el mundo =96 u= ltimas tecnologias en venta libre =96 seguros (garantia de por vida), = simples de usarse microaudifonos de la serie WINTEC DIGITAL =96 garant= izado nadie mas en el mundo los tiene!!!

Excelente, moderno y util regalo= !!!

 

 

+7(495) 510-20-19
------=_NextPart_000_000E_01C911B2.E58F6280--   Acknowledgement sent to Π”Π°Ρ€ΡŒΡΠ“ΠΈΠ»Π΅ΠΌΠ΄ΠΆΠ°Π½ <|agent1@sensis.com.au>:
Extra info received and forwarded to list. Copy sent to Dpkg Developers <debian-dpkg@lists.debian.org>.   -t  Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) Content-Type: text/plain; charset=utf-8 X-Loop: owner@bugs.debian.org From: owner@bugs.debian.org (Debian Bug Tracking System) To: =?UTF-8?Q?=D0=94=D0=B0=D1=80=D1=8C?= =?UTF-8?Q?=D1=8F=D0=93=D0=B8=D0=BB=D0=B5=D0=BC=D0=B4=D0=B6=D0=B0=D0=BD?= <|agent1@sensis.com.au> Subject: Bug#47214: Info received (Invisible wireless earpiece! ) Message-ID: References: <01c911b2$e58f6280$ca580fbd@|agent1> X-Debian-PR-Message: ack-info 47214 X-Debian-PR-Package: dpkg X-Debian-PR-Source: dpkg Reply-To: 47214@bugs.debian.org Thank you for the additional information you have supplied regarding this Bug report. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): Dpkg Developers If you wish to submit further information on this problem, please send it to 47214@bugs.debian.org, as before. Please do not send mail to owner@bugs.debian.org unless you wish to report a problem with the Bug-tracking system. --=20 47214: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D47214 Debian Bug Tracking System Contact owner@bugs.debian.org with problems   Received: (at 47214) by bugs.debian.org; 8 Sep 2008 16:00:43 +0000 From |agent1@sensis.com.au Mon Sep 08 16:00:43 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rietz.debian.org X-Spam-Level: *** X-Spam-Status: No, score=3.6 required=4.0 tests=MULTALT,NEXTPART,RDNS_DYNAMIC autolearn=no version=3.2.3-bugs.debian.org_2005_01_02 Return-path: <|agent1@sensis.com.au> Received: from 189-015-88-202.xd-dynamic.ctbcnetsuper.com.br ([189.15.88.202] helo=OLIVIA) by rietz.debian.org with esmtp (Exim 4.63) (envelope-from <|agent1@sensis.com.au>) id 1KcjAP-0005NV-HR; Mon, 08 Sep 2008 16:00:42 +0000 Received: from [189.15.88.202] by mail12.sen-net.net; Mon, 8 Sep 2008 13:00:41 -0300 From: =?koi8-r?B?5MHS2NHnyczFzcTWwc4=?= <|agent1@sensis.com.au> To: <44039@bugs.debian.org> Subject: Invisible wireless earpiece! Date: Mon, 8 Sep 2008 13:00:41 -0300 Message-ID: <01c911b2$e58f6280$ca580fbd@|agent1> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000E_01C911B2.E58F6280" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2905 Importance: Normal This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C911B2.E58F6280 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit EXAMS AND NEGOTIATIONS – NO PROBLEM – EXAMENES Y CONVERSACIONES ENGLISH ESPANOL Special equipment, used by presidents, spies and celebrities! The lastest highest class equipment - now available for you! Invisible wireless earpiece! Exams, negotiations, courts, security, TV – successful work without preparation with assistance of micro-earpiece. For the first time now - lastest technologies in free sale – trustable (lifetime guaranty), easy in use earpieces series WINTEC DIGITAL – we guarantee nobody has them in the world!!! Excellent, stylish and useful gift!!! Equipo especial que usan presidentes, espias y estrellas! Ultima tecnologia de alta clase – ahora prara Usted! Microaudifono inalambrico invisible! Examenes, conversaciones, conferencias, juicios, servicios de seguridad y TV – trabajo exitoso sin preparacion con la ayuda del microaudifono! Por primera vez en el mundo – ultimas tecnologias en venta libre – seguros (garantia de por vida), simples de usarse microaudifonos de la serie WINTEC DIGITAL – garantizado nadie mas en el mundo los tiene!!! Excelente, moderno y util regalo!!! +7(495) 510-20-19 ------=_NextPart_000_000E_01C911B2.E58F6280 Content-Type: text/html; charset="koi8-r" Content-Transfer-Encoding: quoted-printable
EXAMS= AND NEGOTIATIONS
=96 NO PROBLEM =96
EXAMENES Y CONVERSACIONES
ENGLISH<= /span>
ESPANOL<= /span>
Special eq= uipment, used by presidents, spies and celebrities! The lastest highe= st class equipment - now available for you!

Invisible wireless earpiece!

Exams, negotiations, courts, secu= rity, TV =96 successful work without preparation with assistance of mi= cro-earpiece.

For the first time now - lastest= technologies in free sale =96 trustable (lifetime guaranty), easy in = use earpieces series WINTEC DIGITAL =96 we guarantee nobody has them i= n the world!!!

Excellent, stylish and useful gift!= !!

Equipo esp= ecial que usan presidentes, espias y estrellas! Ultima tecnologia de a= lta clase =96 ahora prara Usted!

Microaudifono inalambrico invisib= le!

Examenes, conversaciones, confere= ncias, juicios, servicios de seguridad y TV =96 trabajo exitoso sin pr= eparacion con la ayuda del microaudifono! =

Por primera vez en el mundo =96 u= ltimas tecnologias en venta libre =96 seguros (garantia de por vida), = simples de usarse microaudifonos de la serie WINTEC DIGITAL =96 garant= izado nadie mas en el mundo los tiene!!!

Excelente, moderno y util regalo= !!!

 

 

+7(495) 510-20-19
------=_NextPart_000_000E_01C911B2.E58F6280--