[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: lib/39684: RB_REMOVE trashes link to tree, when requested to remove object that isn't in tree
The following reply was made to PR lib/39684; it has been noted by GNATS.
From: Antti Kantee <pooka%cs.hut.fi@localhost>
Subject: Re: lib/39684: RB_REMOVE trashes link to tree, when requested to
remove object that isn't in tree
Date: Fri, 3 Oct 2008 18:00:21 +0300
On Fri Oct 03 2008 at 14:10:00 +0000, m-Matti-a.Lehtonen%IKI.Fi@localhost
> RB_REMOVE trashes root of tree (set to NULL), when requested to remove
> object that isn't in tree.
> I would expect that "nothing" is done, when removing object that isn't in
> tree, instead of losing the whole tree.
> Try to remove an object from [populated] tree that isn't actually inserted
> Make sure that object exists (by e.g. RB_INSERT() or RB_FIND() ) in tree,
> before remove operation.
IMHO this is a case of "garbage in, garbage out". You should probably
add a "ONTREE" flag or somesuch to your local data structure.
Main Index |
Thread Index |