From: Oleg Drokin <green@namesys.com>
To: dan carpenter <error27@email.com>
Cc: linux-kernel@vger.kernel.org, smatch-discuss@lists.sf.net
Subject: Re: smatch update / 2.5.64 / kbugs.org
Date: Fri, 14 Mar 2003 11:25:15 +0300 [thread overview]
Message-ID: <20030314112515.A32604@namesys.com> (raw)
In-Reply-To: <20030307095307.E4600@namesys.com>
[-- Attachment #1: Type: text/plain, Size: 1233 bytes --]
Hello!
On Fri, Mar 07, 2003 at 09:53:07AM +0300, Oleg Drokin wrote:
> Actually I think these free() checks can be extended a lot, it can detect memory leaks and so on.
Ok, it took me awhile, but here is much extended version of unfree checker.
Now the biggest source of false positives is assignments to global variables and to arrays
I have more complete list of problematic places at beginning of the script, in case anyone
want to enhance it. Also it should now work with userspace code.
<shameless plug>Funnily enough, even though I started to work on this script hoping to find some
deeply hidden bugs in reiserfs, I ended up finding bugs in other filesystems instead ;)</shameless plug>
It also requires this function in smatch.pm (I see that now you have changed set_state() to allow empty
second argument, so it may be not that strictly needed now).
sub reset_state {
my $name;
my $i;
$name = $_[0];
foreach $state (@states){
my $quotedname = quotemeta $name;
my $temp = pop(@states);
if ($state->{name} =~ /^$quotedname$/){
$state->{state} = 0;
$state->{start_line} = 0;
return;
}
push @states, $temp;
}
}
Bye,
Oleg
[-- Attachment #2: unfree-new1.pl --]
[-- Type: application/x-perl, Size: 21580 bytes --]
next prev parent reply other threads:[~2003-03-14 8:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-07 6:45 smatch update / 2.5.64 / kbugs.org dan carpenter
2003-03-07 6:53 ` Oleg Drokin
2003-03-14 8:25 ` Oleg Drokin [this message]
-- strict thread matches above, loose matches on Subject: below --
2003-03-07 8:32 dan carpenter
2003-03-06 8:15 dan carpenter
2003-03-06 7:37 dan carpenter
2003-03-06 7:42 ` Greg KH
2003-03-06 15:37 ` Oleg Drokin
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=20030314112515.A32604@namesys.com \
--to=green@namesys.com \
--cc=error27@email.com \
--cc=linux-kernel@vger.kernel.org \
--cc=smatch-discuss@lists.sf.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox