Your message dated Sat, 7 Mar 2020 19:32:24 +0100
with message-id <[email protected]>
and subject line Re: cppcheck: Memory leak no longer detected
has caused the Debian Bug report #923325,
regarding cppcheck: Memory leak no longer detected
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.)


-- 
923325: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=923325
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cppcheck-gui
Version: 1.86-1
Severity: normal

Dear Maintainer,

a memory leak error is not visible in gui. When using the version from stretch 
the error is visible again.

Small example:
...
#include <QString>
#include <iostream>

class TestType {
public:
   char ca[12];
   int ul;
   double d;
};

char* rawData()
{
        static char data[] = "ASDFASDGASDGSG";
        return data;
}

QString foo()
{
        int type = 0x100;
        if ( type == 0x100 ) {
                TestType *tt = new TestType();
                tt=(TestType *)rawData(); //<-memleak
                return QString(tt->ca)+" "+QString::number(tt->ul)+" 
"+QString::number(tt->d);
                delete tt; // <- never come here ...
        }
        else{
                return QString("Else");
        }
}

int main()
{
        QString test = foo();
        std::cout << test.toStdString() << std::endl;
        return 0;
}
...

I just removed this complete stupid code from the project, but I wonder
why the error is visible in 1.76-1 and its not in 1.86-1 when using
the same data base.

Regards
Gavin


-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages cppcheck-gui depends on:
ii  libc6                2.28-7
ii  libgcc1              1:8.2.0-21
ii  libgl1               1.1.0-1
ii  libpcre3             2:8.39-11
ii  libqt5core5a         5.11.3+dfsg-5
ii  libqt5gui5           5.11.3+dfsg-5
ii  libqt5printsupport5  5.11.3+dfsg-5
ii  libqt5widgets5       5.11.3+dfsg-5
ii  libstdc++6           8.2.0-21
ii  libtinyxml2-6a       7.0.0+dfsg-1

cppcheck-gui recommends no packages.

Versions of packages cppcheck-gui suggests:
ii  clang    1:7.0-47
ii  python3  3.7.2-1

-- no debconf information

--- End Message ---
--- Begin Message ---
This bug was fixed in version 1.89. Closing.

--- End Message ---

Reply via email to