From: Dan Carpenter <dan.carpenter@linaro.org>
To: Toomas Soome <tsoome@me.com>
Cc: smatch@vger.kernel.org
Subject: Re: apparent bug about check_free_strict
Date: Tue, 25 Nov 2025 16:50:06 +0300 [thread overview]
Message-ID: <aSW0DiVHTk-2GXd8@stanley.mountain> (raw)
In-Reply-To: <45D1224C-6C4C-4745-9FA6-F07BB1792831@me.com>
On Tue, Nov 25, 2025 at 03:37:08PM +0200, Toomas Soome wrote:
>
> Ok, i did pull your latest update, and the problem is still there. I actually got very graphical example:
>
> /code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../smb_share_doorclnt.c:274 smb_share_count() warn: passing freed memory 'dec_ctx' (line 272)
> /code/illumos-gate/usr/src/tools/proto/root_i386-nd/opt/onbld/bin/i386/smatch: ../smb_share_doorclnt.c:279 smb_share_count() warn: passing freed memory 'dec_ctx' (line 272)
>
These warnings are almost certainly caused because Smatch thinks
smb_share_dchk() is freeing the pointer. It generates two warnings
because the if and else paths are handled separately.
It's possible this is a Makefile bug... Could you do a make clean
and rebuild Smatch?
regards,
dan carpenter
next prev parent reply other threads:[~2025-11-25 13:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 11:55 apparent bug about check_free_strict Toomas Soome
2024-11-18 12:52 ` Dan Carpenter
2024-11-18 13:28 ` Toomas Soome
2024-11-18 15:27 ` Dan Carpenter
[not found] ` <ADB0555A-8DE4-49D1-B769-A02EB82690A9@me.com>
2025-11-21 18:01 ` Toomas Soome
2025-11-24 14:46 ` Dan Carpenter
2025-11-24 15:30 ` Toomas Soome
2025-11-25 13:38 ` Toomas Soome
2025-11-25 14:28 ` Toomas Soome
2025-11-25 14:50 ` Dan Carpenter
2025-11-25 15:04 ` Toomas Soome
2025-11-25 15:34 ` Oleg Drokin
2025-11-26 12:14 ` Dan Carpenter
2025-11-25 17:12 ` Dan Carpenter
[not found] ` <32FD91B6-32B3-45FC-A6E5-EA39439466E3@me.com>
2025-11-26 15:12 ` Dan Carpenter
[not found] ` <45D1224C-6C4C-4745-9FA6-F07BB1792831@me.com>
2025-11-25 13:50 ` Dan Carpenter [this message]
2025-11-25 13:40 ` Dan Carpenter
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=aSW0DiVHTk-2GXd8@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=smatch@vger.kernel.org \
--cc=tsoome@me.com \
/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