On 07/26/2011 04:13 PM, Delesley Hutchins wrote: > This patch fixes a bug in pointer_set.c, where removing a pointer from > a pointer set would corrupt the hash table if the pointer was involved > in any hash collisions. > > Bootstrapped and passed gcc regression testsuite on x86_64-unknown-linux-gnu. > > Okay for google/gcc-4_6? > > -DeLesley > > gcc/Changelog.annotalysis: > 2011-7-26 DeLesley Hutchins <deles...@google.com> > > * gcc/pointer-set.c (pointer_set_delete) bugfix for case of > hash collisions
The logic of the patch looks good. I certainly agree it's a real bug. > + /* find location of p */ But please fix up all the comments to be properly punctuated sentences. > + pset->slots[n] = 0; /* remove ptr from set. */ And avoid end-of-line comments. Put it on the previous line. r~