]> granicus.if.org Git - gc/commitdiff
Add two missing GC_start_debugging() calls.
authorPetter Urkedal <paurkedal@gmail.com>
Sun, 29 Apr 2012 11:30:39 +0000 (13:30 +0200)
committerPetter Urkedal <paurkedal@gmail.com>
Sun, 29 Apr 2012 11:30:39 +0000 (13:30 +0200)
* dbg_mlc.c (GC_debug_generic_malloc_inner): Add GC_start_debugging() if not
done.  This fixes the missing registration of the debug header displacement.
* dbg_mlc.c (GC_debug_generic_malloc_inner_ignore_off_page): Ditto.

dbg_mlc.c

index 5f03d106289a67ce41443f163a136828b5aed26d..c2e2eaa3d57712c96cec6403a0a45c05d29000da 100644 (file)
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -533,6 +533,9 @@ GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb,
                        (unsigned long) lb);
         return(0);
     }
+    if (!GC_debugging_started) {
+        GC_start_debugging();
+    }
     ADD_CALL_CHAIN(result, GC_RETURN_ADDR);
     return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", 0));
   }
@@ -548,6 +551,9 @@ GC_API void * GC_CALL GC_debug_malloc_atomic_ignore_off_page(size_t lb,
                        (unsigned long) lb);
         return(0);
     }
+    if (!GC_debugging_started) {
+        GC_start_debugging();
+    }
     ADD_CALL_CHAIN(result, GC_RETURN_ADDR);
     return (GC_store_debug_info_inner(result, (word)lb, "INTERNAL", 0));
   }