From 917f8724c73d7ec8d50e2df0ed36ccc5c399f20b Mon Sep 17 00:00:00 2001 From: Drvi Date: Thu, 14 Nov 2024 17:26:20 +0100 Subject: [PATCH] Fixup: also respect `allow_new_world` in `jl_method_table_add_backedge` --- src/gf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gf.c b/src/gf.c index 01587653d9645..cbbe6b9c4ea2a 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1756,6 +1756,8 @@ JL_DLLEXPORT void jl_method_instance_add_backedge(jl_method_instance_t *callee, // add a backedge from a non-existent signature to caller JL_DLLEXPORT void jl_method_table_add_backedge(jl_methtable_t *mt, jl_value_t *typ, jl_value_t *caller) { + if (!jl_atomic_load_acquire(&allow_new_worlds)) + return; JL_LOCK(&mt->writelock); if (!mt->backedges) { // lazy-init the backedges array