All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
Subject: [Ksummit-discuss] uninitialized variables bugs
Date: Fri, 6 May 2022 10:23:43 -0600	[thread overview]
Message-ID: <dc58c60e-a92c-92b8-ae5e-d7cf2ef5f051@linuxfoundation.org> (raw)
In-Reply-To: <CAK8P3a0DY2b15yyzpwsjOCqOALfTbsmYf1kTnQZF5wPW8mtFbQ@mail.gmail.com>

On 5/6/22 5:56 AM, Arnd Bergmann wrote:
> On Fri, May 6, 2022 at 11:13 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
>>
>> It's frustrating.  Sometimes the false positives are hard to analyse
>> because I have to read through multiple functions.  A lot of times
>> when I write a patch and a commit message Nathan has already fixed it
>> so it's just a waste of time.
> 
> Agreed. I'm not actually checking for those warnings on gcc any more,
> but just the clang warnings point to a bigger problem.
> 
>> It's risky as well.  The Smatch check for uninitialized variables was
>> broken for most of 2021.  Nathan sometimes goes on vacation.
>>
>> I guess I would hope that one day we can turn on the GCC uninitialized
>> variable warnings again.  That would mean silencing false positives
>> which a lot of people don't want to do...  Maybe Clang has fewer false
>> positives than GCC?
> 

I would like to throw resource leak bugs in the mix. I am finding cppcheck
has been effective in finding them.

I am seeing a lot of file pointer leaks  in error legs in kselftest code error
paths. I have a few fixes in the works to send out.

We could discuss this topic at the LPC Kernel Testing and Dependability mini-conf
as well.

thanks,
-- Shuah




WARNING: multiple messages have this Message-ID (diff)
From: Shuah Khan <skhan@linuxfoundation.org>
To: Arnd Bergmann <arnd@arndb.de>, Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nathan Chancellor <natechancellor@gmail.com>,
	kbuild@lists.01.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ksummit <ksummit-discuss@lists.linuxfoundation.org>,
	kbuild test robot <lkp@intel.com>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [Ksummit-discuss] uninitialized variables bugs
Date: Fri, 6 May 2022 10:23:43 -0600	[thread overview]
Message-ID: <dc58c60e-a92c-92b8-ae5e-d7cf2ef5f051@linuxfoundation.org> (raw)
In-Reply-To: <CAK8P3a0DY2b15yyzpwsjOCqOALfTbsmYf1kTnQZF5wPW8mtFbQ@mail.gmail.com>

On 5/6/22 5:56 AM, Arnd Bergmann wrote:
> On Fri, May 6, 2022 at 11:13 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> 
>>
>> It's frustrating.  Sometimes the false positives are hard to analyse
>> because I have to read through multiple functions.  A lot of times
>> when I write a patch and a commit message Nathan has already fixed it
>> so it's just a waste of time.
> 
> Agreed. I'm not actually checking for those warnings on gcc any more,
> but just the clang warnings point to a bigger problem.
> 
>> It's risky as well.  The Smatch check for uninitialized variables was
>> broken for most of 2021.  Nathan sometimes goes on vacation.
>>
>> I guess I would hope that one day we can turn on the GCC uninitialized
>> variable warnings again.  That would mean silencing false positives
>> which a lot of people don't want to do...  Maybe Clang has fewer false
>> positives than GCC?
> 

I would like to throw resource leak bugs in the mix. I am finding cppcheck
has been effective in finding them.

I am seeing a lot of file pointer leaks  in error legs in kselftest code error
paths. I have a few fixes in the works to send out.

We could discuss this topic at the LPC Kernel Testing and Dependability mini-conf
as well.

thanks,
-- Shuah




  reply	other threads:[~2022-05-06 16:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-06  9:13 [Ksummit-discuss] uninitialized variables bugs Dan Carpenter
2022-05-06  9:13 ` Dan Carpenter
2022-05-06  9:13 ` Dan Carpenter
2022-05-06  9:53 ` [Ksummit-discuss] " Julia Lawall
2022-05-06  9:53   ` Julia Lawall
2022-05-06 11:56 ` Arnd Bergmann
2022-05-06 11:56   ` Arnd Bergmann
2022-05-06 16:23   ` Shuah Khan [this message]
2022-05-06 16:23     ` Shuah Khan
2022-05-06 21:50 ` Nathan Chancellor
2022-05-08 12:17   ` Tom Rix
2022-05-22  9:07 ` [Ksummit-discuss] " Krzysztof Kozlowski
2022-05-22  9:07   ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc58c60e-a92c-92b8-ae5e-d7cf2ef5f051@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.