From 2d21db8a6a1b5e0e5b090efcc9aac3ccf8e8d837 Mon Sep 17 00:00:00 2001 From: lambdageek Date: Wed, 28 Oct 2020 01:02:22 +0000 Subject: [PATCH] [sgen] Add Ward annotations to sgen_get_total_allocated_bytes Attempt to fix https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/ --- src/mono/mono/sgen/sgen-gc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mono/mono/sgen/sgen-gc.h b/src/mono/mono/sgen/sgen-gc.h index 3bc1c9b1908aea..392b30eea2b1e5 100644 --- a/src/mono/mono/sgen/sgen-gc.h +++ b/src/mono/mono/sgen/sgen-gc.h @@ -1130,8 +1130,10 @@ typedef enum { } SgenAllocatorType; void sgen_clear_tlabs (void); -void sgen_update_allocation_count (void); -guint64 sgen_get_total_allocated_bytes (MonoBoolean precise); +void sgen_update_allocation_count (void) + MONO_PERMIT (need (sgen_world_stopped)); +guint64 sgen_get_total_allocated_bytes (MonoBoolean precise) + MONO_PERMIT (need (sgen_lock_gc, sgen_stop_world)); GCObject* sgen_alloc_obj (GCVTable vtable, size_t size) MONO_PERMIT (need (sgen_lock_gc, sgen_stop_world));