[svn:parrot] r48007 - branches/hash_allocator/src

whiteknight at svn.parrot.org whiteknight at svn.parrot.org
Mon Jul 5 10:42:15 UTC 2010


Author: whiteknight
Date: Mon Jul  5 10:42:15 2010
New Revision: 48007
URL: https://trac.parrot.org/parrot/changeset/48007

Log:
[hash] fix a stupid error, and free the Hash structure correctly. This gets past that assertion failure and now exposes a segfault later

Modified:
   branches/hash_allocator/src/hash.c

Modified: branches/hash_allocator/src/hash.c
==============================================================================
--- branches/hash_allocator/src/hash.c	Mon Jul  5 10:36:45 2010	(r48006)
+++ branches/hash_allocator/src/hash.c	Mon Jul  5 10:42:15 2010	(r48007)
@@ -1011,9 +1011,8 @@
 parrot_hash_destroy(PARROT_INTERP, ARGFREE_NOTNULL(Hash *hash))
 {
     ASSERT_ARGS(parrot_hash_destroy)
-    const UINTVAL size = (hash->mask + 1) * sizeof (HashBucket *);
     Parrot_gc_free_memory_chunk(interp, hash->bucket_indices);
-    Parrot_gc_free_fixed_size_storage(interp, size, hash);
+    Parrot_gc_free_fixed_size_storage(interp, sizeof (Hash), hash);
 }
 
 


More information about the parrot-commits mailing list