Debian Bug report logs - #557046
cppcheck: false negative resource leak on exit()

version graph

Package: cppcheck; Maintainer for cppcheck is Joachim Reichel <[email protected]>; Source for cppcheck is src:cppcheck (PTS, buildd, popcon).

Reported by: Raphael Geissert <[email protected]>

Date: Thu, 19 Nov 2009 07:18:01 UTC

Severity: wishlist

Tags: upstream

Found in version cppcheck/1.38-1

Forwarded to http://trac.cppcheck.net/ticket/992

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Reijo Tomperi <[email protected]>:
Bug#557046; Package cppcheck. (Thu, 19 Nov 2009 07:18:04 GMT) (full text, mbox, link).


Message #3 received at [email protected] (full text, mbox, reply):

From: Raphael Geissert <[email protected]>
To: [email protected]
Subject: cppcheck: false negative resource leak on exit()
Date: Thu, 19 Nov 2009 01:13:05 -0600
[Message part 1 (text/plain, inline)]
Package: cppcheck
Version: 1.38-1
Severity: wishlist

Hi,

Attached test case demonstrates a possible fd leak whenever exit(3) is called.
cppcheck correctly detects the leakage when 'return' is used instead.

Would be great if cppcheck could handle exit(3) as well.

Cheers,
-- 
Raphael Geissert - Debian Developer
www.debian.org - get.debian.net
[fd-leaks-on-exit.c (text/x-csrc, inline)]
void t(void) {
    FILE *a,*b;
    if ((a = fopen("/dev/null", "r")) == NULL)
	exit(EXIT_FAILURE);
    if ((b = fopen("/dev/null", "r")) == NULL)
	exit(EXIT_FAILURE);

    fclose(a);
    fclose(b);
}

Added tag(s) upstream. Request was from Nicolás Alvarez <[email protected]> to [email protected]. (Thu, 19 Nov 2009 21:18:04 GMT) (full text, mbox, link).


Information forwarded to [email protected]:
Bug#557046; Package cppcheck. (Fri, 20 Nov 2009 22:18:05 GMT) (full text, mbox, link).


Acknowledgement sent to Reijo Tomperi <[email protected]>:
Extra info received and forwarded to list. (Fri, 20 Nov 2009 22:18:05 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Reijo Tomperi <[email protected]>
To: Raphael Geissert <[email protected]>, [email protected]
Subject: Re: Bug#557046: cppcheck: false negative resource leak on exit()
Date: Sat, 21 Nov 2009 00:10:32 +0200
Hi,

Thanks for report!

The leak with exit() is disabled by design. But we could use a command 
line option to enable it. Reported to upstream:
http://sourceforge.net/apps/trac/cppcheck/ticket/992

-- 
Reijo




Set Bug forwarded-to-address to 'http://sourceforge.net/apps/trac/cppcheck/ticket/992'. Request was from Paul Wise <[email protected]> to [email protected]. (Mon, 26 Mar 2012 03:51:05 GMT) (full text, mbox, link).


Changed Bug forwarded-to-address to 'http://trac.cppcheck.net/ticket/992' from 'http://sourceforge.net/apps/trac/cppcheck/ticket/992' Request was from Sandro Tosi <[email protected]> to [email protected]. (Tue, 29 Dec 2015 00:33:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 15:05:34 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.