Your message dated Sat, 12 Feb 2011 07:17:08 +0000
with message-id <[email protected]>
and subject line Bug#609354: fixed in cppcheck 1.47-1
has caused the Debian Bug report #609354,
regarding cppcheck: memory leak false positive
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
609354: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609354
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cppcheck
Version: 1.44-1

Things like the following cause cppcheck to report a memory leak
where there is none (whole example generated from the preprocessed
file is attachment):

retvalue f(const char *c, const char *fallback, char **s_p) {
 retvalue r;
 char *s;

 r = g(c, &s); /* sets s if return value > 0 */
 if( r == RET_NOTHING ) {
  s = strdup(fallback);
  if( s == ((void *)0) )
   r = RET_ERROR_OOM;
 }
 if( r < 0 )
  return r; /* <- cppcheck reports: [test2.c:22]: (error) Memory leak: s */
 *s_p = s;
 return RET_OK;
}

Also found with 68beffca043ba23114824ed46408e65cb0d653ec

        Bernhard R. Link
extern char *strdup (__const char *__s) __attribute__ ((__nothrow__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
enum retvalue_enum {
 RET_ERROR_OOM = -3,
 RET_ERROR = -1,
 RET_NOTHING = 0,
 RET_OK = 1
};
typedef enum retvalue_enum retvalue;
retvalue g(const char *, char **);

retvalue f(const char *c, const char *fallback, char **s_p) {
 retvalue r;
 char *s;

 r = g(c, &s); /* sets s if return value > 0 */
 if( r == RET_NOTHING ) {
  s = strdup(fallback);
  if( s == ((void *)0) )
   r = RET_ERROR_OOM;
 }
 if( r < 0 )
  return r; /* <- cppcheck reports: [test2.c:22]: (error) Memory leak: s */
 *s_p = s;
 return RET_OK;
}

--- End Message ---
--- Begin Message ---
Source: cppcheck
Source-Version: 1.47-1

We believe that the bug you reported is fixed in the latest version of
cppcheck, which is due to be installed in the Debian FTP archive:

cppcheck_1.47-1.debian.tar.gz
  to main/c/cppcheck/cppcheck_1.47-1.debian.tar.gz
cppcheck_1.47-1.dsc
  to main/c/cppcheck/cppcheck_1.47-1.dsc
cppcheck_1.47-1_i386.deb
  to main/c/cppcheck/cppcheck_1.47-1_i386.deb
cppcheck_1.47.orig.tar.gz
  to main/c/cppcheck/cppcheck_1.47.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Reijo Tomperi <[email protected]> (supplier of updated cppcheck 
package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 06 Feb 2011 20:20:48 +0200
Source: cppcheck
Binary: cppcheck
Architecture: source i386
Version: 1.47-1
Distribution: unstable
Urgency: low
Maintainer: Reijo Tomperi <[email protected]>
Changed-By: Reijo Tomperi <[email protected]>
Description: 
 cppcheck   - tool for static C/C++ code analysis
Closes: 599190 607312 608002 609354
Changes: 
 cppcheck (1.47-1) unstable; urgency=low
 .
   * New upstream release
   * Default value for --enable described in manual. Closes: #599190
   * False positive fixed: Function pointer returning typedef. Closes: #607312
   * 0X10 number handling fixed. Closes: #608002
   * False positive fixed: Memory leak. Closes: #609354
   * Build time dependency added: libpcre3-dev
   * Add tinyxml to copyright file
   * control: Standars-version changed 3.9.0 -> 3.9.1
   * Apply following patches from Peter Pentchev:
     - Use DEP-5 rev. 135 for the copyright file format.
     - Honor the C preprocessor flags in CPPFLAGS.
     - Use dpkg-buildflags to obtain the default CPPFLAGS, CXXFLAGS and LDFLAGS.
     - Use build hardening unless the "nohardening" build option is specified.
     - Use the dh(1) helper.
     - Split dh_* arguments into separate files to simplify the build.
     - Use debhelper override rules.
     - Bump the debhelper compat level to 8 with no changes.
     - Update to DEP 5 rev. 166 use single copyright header
     - Bump the upstream copyright years
Checksums-Sha1: 
 5206597e0c39eab6861cf2c6d44e9909b65fde21 1125 cppcheck_1.47-1.dsc
 76fc76b7c6e65d63058337f828c592b16c03952a 1005795 cppcheck_1.47.orig.tar.gz
 bbade57a2c672f4dd2b24fe658f42c608a6b7b76 5335 cppcheck_1.47-1.debian.tar.gz
 e8635f6101b48f566e6a440c21ecbb21f7483ace 663770 cppcheck_1.47-1_i386.deb
Checksums-Sha256: 
 955eb8f17a9f1c274cbdbda27e0dc2883808f5b3ea12510586ce142d9516a658 1125 
cppcheck_1.47-1.dsc
 de78df4952e0206dc4373d06497aeb41624cf6da3e979c193a9d7c4920f143ef 1005795 
cppcheck_1.47.orig.tar.gz
 48a8db144a1a4dfd5542eff16e040f20eb43af491c4d83bfeabee69db805542b 5335 
cppcheck_1.47-1.debian.tar.gz
 c85fccce6d46e0d1b3fc06b0dc20aa94d8b76851a8be87da96975d1a6542202f 663770 
cppcheck_1.47-1_i386.deb
Files: 
 ebdd0b247fcf0d777dc4d78a16ae8097 1125 devel optional cppcheck_1.47-1.dsc
 e767abed13d424e5f8cac53c06ad42d6 1005795 devel optional 
cppcheck_1.47.orig.tar.gz
 ecf94b8275dba165747602e5a588cac6 5335 devel optional 
cppcheck_1.47-1.debian.tar.gz
 f2ac5ed4a615328317e859c20e631067 663770 devel optional cppcheck_1.47-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAk1WMl0ACgkQYy49rUbZzlqTxACfejacstC+F7oAq5gXxjIyvsTy
IZMAoJP3VmrInYun5S6YERF4q3YFjXLE
=9Grp
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to