From: Josh Triplett <josh@freedesktop.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-sparse <linux-sparse@vger.kernel.org>
Subject: Re: [PATCH] fix bug in context tracking code
Date: Thu, 24 Apr 2008 19:34:39 -0700 [thread overview]
Message-ID: <4811433F.6010306@freedesktop.org> (raw)
In-Reply-To: <1208946289.31429.66.camel@johannes.berg>
[-- Attachment #1: Type: text/plain, Size: 917 bytes --]
Johannes Berg wrote:
> My optimisation to avoid recursion into BBs when checking contexts
> lead to a failure in a case like this:
>
> static int warn_conditional(void)
> {
> if (condition)
> return 0;
>
> a();
> if (condition == 0)
> return 1;
> r();
> return 0;
> }
>
> because some blocks are called with different contexts and thus
> need to be checked multiple times.
>
> The obvious fix would be to decrease the recursion depth at the
> end of the BB check function, but that, while correct, leads to
> extremely long sparse runtimes on somewhat complex functions.
> Thus, this patch also makes sparse cache which contexts it has
> checked a block in and avoid the re-checking in that case.
>
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Applied and pushed; thanks!
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2008-04-25 2:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-23 10:24 [PATCH] fix bug in context tracking code Johannes Berg
2008-04-25 2:34 ` Josh Triplett [this message]
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=4811433F.6010306@freedesktop.org \
--to=josh@freedesktop.org \
--cc=johannes@sipsolutions.net \
--cc=linux-sparse@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).