wingo pushed a commit to branch wip-whippet
in repository guile.

commit dcfdc547f6d548e5a302d6a725cc3ceca894c954
Author: Andy Wingo <wi...@igalia.com>
AuthorDate: Mon Sep 16 11:45:01 2024 +0200

    Whoops, fix refactor-induced locking problem
---
 src/adaptive-heap-sizer.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/adaptive-heap-sizer.h b/src/adaptive-heap-sizer.h
index df38f181d..d2c7c8612 100644
--- a/src/adaptive-heap-sizer.h
+++ b/src/adaptive-heap-sizer.h
@@ -90,6 +90,7 @@ gc_adaptive_heap_sizer_on_gc(struct gc_adaptive_heap_sizer 
*sizer,
 static void
 gc_adaptive_heap_sizer_background_task(void *data) {
   struct gc_adaptive_heap_sizer *sizer = data;
+  pthread_mutex_lock(&sizer->lock);
   uint64_t bytes_allocated =
     sizer->get_allocation_counter(sizer->callback_data);
   uint64_t heartbeat = gc_platform_monotonic_nanoseconds();

Reply via email to