From: Robert Love <rml@tech9.net>
To: Zach Brown <zab@zabbo.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] list_head debugging?
Date: 20 Sep 2002 17:34:36 -0400 [thread overview]
Message-ID: <1032557677.966.863.camel@phantasy> (raw)
In-Reply-To: <20020920165304.A4588@bitchcake.off.net>
On Fri, 2002-09-20 at 16:53, Zach Brown wrote:
> A friend recently was bitten by passing a list_head from list_for_each
> to a code path that later moved the list_head around. Does the attached
> patch re-create some debugging wheel that's hiding off in a corner
> somewhere?
>
> Beyond catching the obvious use of uninitialized things, it also seems
> to catch double adds, double deletes, and simple deletes of 'pos' in
> list_for_each. it even seems to bark about the seemingly hard-to-detect
> movement of 'pos' from the iterating list to another, but probably only
> in the rare case where you're unconditionally moving all 'pos' in the
> loop body. (you eventually iterate into the second list's head and try
> to add it to itself)
Hey, cool!
Yes, I think a lot of people would be all for something like this as a
CONFIG_DEBUG_LISTS or such. Very nice.
Robert Love
next prev parent reply other threads:[~2002-09-20 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-20 20:53 [PATCH] list_head debugging? Zach Brown
2002-09-20 21:34 ` Robert Love [this message]
2002-09-21 0:29 ` Thunder from the hill
2002-09-21 4:12 ` Arnaldo Carvalho de Melo
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=1032557677.966.863.camel@phantasy \
--to=rml@tech9.net \
--cc=linux-kernel@vger.kernel.org \
--cc=zab@zabbo.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