summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2023-01-28 23:04:16 +0300
committerIvan Maidanski <ivmai@mail.ru>2023-03-14 11:35:04 +0300
commit71ff4a4193a58e2a1f8f3a71ab5001e7f5aff458 (patch)
tree1a0f8bcc195ab68c49f83bfe79319dbcf3070266
parent1265600857868e4eba211df63bd3a431fcd6b6d4 (diff)
downloadbdwgc-71ff4a4193a58e2a1f8f3a71ab5001e7f5aff458.tar.gz
Fix DCL_LOCK_STATE placement in GC_set_oom_fn
(fix of commit c7047ca9e) * misc.c (GC_set_oom_fn): Move GC_ASSERT() to be after DCL_LOCK_STATE.
-rw-r--r--misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index b542819d..bed9fc2d 100644
--- a/misc.c
+++ b/misc.c
@@ -2339,8 +2339,9 @@ GC_API GC_word GC_CALL GC_get_gc_no(void)
GC_API void GC_CALL GC_set_oom_fn(GC_oom_func fn)
{
- GC_ASSERT(NONNULL_ARG_NOT_NULL(fn));
DCL_LOCK_STATE;
+
+ GC_ASSERT(NONNULL_ARG_NOT_NULL(fn));
LOCK();
GC_oom_fn = fn;
UNLOCK();