[Gc] Problem with GC on FreeBSD

Petter Urkedal urkedal at nbi.dk
Thu Apr 19 10:27:59 PDT 2012


On 2012-04-19, Petter Urkedal wrote:
> is commented out from thread_local_alloc.c.  I attach a brewed down
> version on disclaim_test.c which uses GC_malloc along with the change to
> thread_local_alloc.c needed to unveil the bug.  I tried git-bisect to

And here comes the promised attachments.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bisect_test.c
Type: text/x-c
Size: 3895 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20120419/6ca8db0c/bisect_test.bin
-------------- next part --------------
diff --git a/thread_local_alloc.c b/thread_local_alloc.c
index 3628910..306efd3 100644
--- a/thread_local_alloc.c
+++ b/thread_local_alloc.c
@@ -169,7 +169,7 @@ GC_API void * GC_CALL GC_malloc(size_t bytes)
 #   endif
     GC_ASSERT(GC_is_initialized);
 
-    GC_ASSERT(GC_is_thread_tsd_valid(tsd));
+//    GC_ASSERT(GC_is_thread_tsd_valid(tsd));
 
     tiny_fl = ((GC_tlfs)tsd) -> normal_freelists;
     GC_FAST_MALLOC_GRANS(result, granules, tiny_fl, DIRECT_GRANULES,
-------------- next part --------------
diff --git a/thread_local_alloc.c b/thread_local_alloc.c
index b3fe28c..bee4f85 100644
--- a/thread_local_alloc.c
+++ b/thread_local_alloc.c
@@ -145,7 +145,7 @@ void * GC_malloc(size_t bytes)
 	return GC_core_malloc(bytes);
       }
 #   endif
-#   ifdef GC_ASSERTIONS
+#   ifdef XXX_GC_ASSERTIONS
       /* We can't check tsd correctly, since we don't have access to 	*/
       /* the right declarations.  But we can check that it's close.	*/
       LOCK();


More information about the Gc mailing list