[Libvir] [PATCH] Fix the function that remove the element of the hash table.

Jim Meyering jim at meyering.net
Wed Feb 6 08:38:29 UTC 2008


Hiroyuki Kaguchi <fj7025cf at aa.jp.fujitsu.com> wrote:
> Though this patch has not been applied yet, are there any problems in this patch?
> If there is no problem, could you apply this patch ?
>
> (2008/01/29 23:45), Daniel P. Berrange wrote:
>> On Tue, Jan 29, 2008 at 11:32:04AM +0900, Hiroyuki Kaguchi wrote:
>>> There are two logic error and a unnecessary else-statement
>>> in virHashRemoveSet function.
>>>
>>> This patch fix the following.
>>> (1/3) The logic error that use released memory area.
>>> (2/3) The logic error that doesn't remove elements.

Considering your analysis, I'm sure there's no problem.  However, it
would be far easier to accept if we could easily demonstrate the failures.
Can you provide a stand-alone test case that provokes #1 and #2?

Ideally, it would be in the form of a main program that initializes
a hash table, performs some inserts and then performs the
offending deletion.

Bonus points if you also add a test case (run by "make check")
that fails before your patch and passes once it's applied.

>>> (3/3) Unnecessary else-statement.




More information about the libvir-list mailing list