Skip to content

Commit 0c76f54

Browse files
authored
[release-1.12] Fix missing CodeInstance owner lookup in _jl_invoke (#59562)
1 parent 6619681 commit 0c76f54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3980,7 +3980,8 @@ STATIC_INLINE jl_value_t *_jl_invoke(jl_value_t *F, jl_value_t **args, uint32_t
39803980
// manually inlined copy of jl_method_compiled
39813981
jl_code_instance_t *codeinst = jl_atomic_load_relaxed(&mfunc->cache);
39823982
while (codeinst) {
3983-
if (jl_atomic_load_relaxed(&codeinst->min_world) <= world && world <= jl_atomic_load_relaxed(&codeinst->max_world)) {
3983+
if (jl_atomic_load_relaxed(&codeinst->min_world) <= world && world <= jl_atomic_load_relaxed(&codeinst->max_world)
3984+
&& codeinst->owner == jl_nothing) {
39843985
jl_callptr_t invoke = jl_atomic_load_acquire(&codeinst->invoke);
39853986
if (invoke != NULL) {
39863987
jl_value_t *res = invoke(F, args, nargs, codeinst);

0 commit comments

Comments
 (0)