Changeset: 054b82fd68c2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=054b82fd68c2
Modified Files:
gdk/gdk_atoms.c
Branch: Feb2013
Log Message:
Fix for changeset 486f2ab17d12: the linked hash list goes the other way.
diffs (27 lines):
diff --git a/gdk/gdk_atoms.c b/gdk/gdk_atoms.c
--- a/gdk/gdk_atoms.c
+++ b/gdk/gdk_atoms.c
@@ -1116,11 +1116,21 @@ strCleanHash(Heap *h, int rebuild)
GDK_STRHASH(s, strhash);
off = strhash & GDK_STRHASHMASK;
bucket = ((stridx_t *) h->base) + off;
- if (*bucket == 0)
- *bucket = pos - extralen - sizeof(stridx_t);
+ *bucket = pos - extralen - sizeof(stridx_t);
+ pos += GDK_STRLEN(s);
+ }
+#ifndef NDEBUG
+ pos = GDK_STRHASHSIZE;
+ while (pos < h->free) {
+ pad = GDK_VARALIGN - (pos & (GDK_VARALIGN - 1));
+ if (pad < sizeof(stridx_t))
+ pad += GDK_VARALIGN;
+ pos += pad + extralen;
+ s = h->base + pos;
assert(strLocate(h, s) != 0);
pos += GDK_STRLEN(s);
}
+#endif
}
}
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list