[lvm-devel] [PATCH 4/5] Fix theoretical usage of NULL pointer dereference

ejt at redhat.com ejt at redhat.com
Wed Oct 27 10:19:04 UTC 2010


At Tue, 26 Oct 2010 14:37:43 +0100,
Alasdair G Kergon wrote:
> 
> On Tue, Oct 26, 2010 at 02:59:25PM +0200, Zdenek Kabelac wrote:
> > @@ -97,6 +97,12 @@ int ttree_insert(struct ttree *tt, unsigned int *key, void *data)
> 
> > +	if (!*c) {
> > +		log_error(INTERNAL_ERROR "Insert failed.");
> 
> What am I missing here?
> Isn't that condition you are proposing to add logically impossible to
> trigger?!

Yes, it can't happen, as I said the first time this patch went round.

One thing I'm not clear on is how much benefit we're seeing from the
CLang build?  Kabi, how many genuine bugs did you find when you went
through this process?  If the benefits are real, then we can live with
check like these.  It would be nice if it was clearer that they are
only there to pacify clang, maybe put a conditional compile in so
they're only included with the clang build?

- Joe




More information about the lvm-devel mailing list