diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2023-01-28 23:04:16 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2023-03-14 11:35:04 +0300 |
commit | 71ff4a4193a58e2a1f8f3a71ab5001e7f5aff458 (patch) | |
tree | 1a0f8bcc195ab68c49f83bfe79319dbcf3070266 | |
parent | 1265600857868e4eba211df63bd3a431fcd6b6d4 (diff) | |
download | bdwgc-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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(); |