lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAK7LNATO-z+S_jH_g9J1WFvzG1vqtODdK5vrav6xOV341yGX9g@mail.gmail.com>
Date:   Thu, 30 Jul 2020 00:13:35 +0900
From:   Masahiro Yamada <masahiroy@...nel.org>
To:     David Binderman <dcb314@...mail.com>
Cc:     "linux-kbuild@...r.kernel.org" <linux-kbuild@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: linux-5.8-rc4/scripts/kconfig/qconf.cc: 2 * bad delete ?

On Wed, Jul 29, 2020 at 3:28 PM David Binderman <dcb314@...mail.com> wrote:
>
> Hello there,
>
> >Will you send a patch, or shall I do it?
>
> Option 2 please. I gave up doing kernel patches a long time ago.

OK, I will send a patch.


> >Could you please teach me how to reproduce them?
>
> --language=c++ looks like a good candidate for a fix.
>
> Regards
>
> David Binderman
>

--language=c++ made no difference, but
I figured out why cppcheck did not work for me.


If scripts/kconfig/qconf.moc is remaining,
cppcheck does not work.


After I deleted it, cppcheck worked for me.


masahiro@...ar:~/workspace/linux$ make build_xconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/images.o
  HOSTCC  scripts/kconfig/confdata.o
  HOSTCC  scripts/kconfig/expr.o
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
  HOSTCC  scripts/kconfig/lexer.lex.o
  HOSTCC  scripts/kconfig/parser.tab.o
  HOSTCC  scripts/kconfig/preprocess.o
  HOSTCC  scripts/kconfig/symbol.o
  HOSTCC  scripts/kconfig/util.o
  UPD     scripts/kconfig/qconf-cfg
  MOC     scripts/kconfig/qconf.moc
  HOSTCXX scripts/kconfig/qconf.o
  HOSTLD  scripts/kconfig/qconf
masahiro@...ar:~/workspace/linux$ cppcheck  scripts/kconfig/qconf.cc
Checking scripts/kconfig/qconf.cc ...
masahiro@...ar:~/workspace/linux$ rm -f scripts/kconfig/qconf.moc
masahiro@...ar:~/workspace/linux$ cppcheck  scripts/kconfig/qconf.cc
Checking scripts/kconfig/qconf.cc ...
scripts/kconfig/qconf.cc:1242:10: error: Mismatching allocation and
deallocation: data [mismatchAllocDealloc]
  delete data;
         ^
scripts/kconfig/qconf.cc:1236:15: note: Mismatching allocation and
deallocation: data
 char *data = new char[count + 1];
              ^
scripts/kconfig/qconf.cc:1242:10: note: Mismatching allocation and
deallocation: data
  delete data;
         ^
scripts/kconfig/qconf.cc:1255:10: error: Mismatching allocation and
deallocation: data [mismatchAllocDealloc]
  delete data;
         ^
scripts/kconfig/qconf.cc:1236:15: note: Mismatching allocation and
deallocation: data
 char *data = new char[count + 1];
              ^
scripts/kconfig/qconf.cc:1255:10: note: Mismatching allocation and
deallocation: data
  delete data;
         ^








-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ