From 0b642e7ae0fae6c2a2f60e241e2e79677e71dc93 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Mon, 10 Feb 2020 22:41:45 -0500 Subject: [PATCH] precompile: avoid a potential crash when adding methods fixes #29859 --- src/gf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gf.c b/src/gf.c index 97d4d50afd6b1..16aaf85bb4fae 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1356,7 +1356,8 @@ static int check_ambiguous_visitor(jl_typemap_entry_t *oldentry, struct typemap_ // ok: record that this method definition is being partially replaced // (either with a real definition, or an ambiguity error) - if (shadowed) { + // be careful not to try to scan something from the current dump-reload though + if (shadowed && oldentry->min_world != closure->newentry->min_world) { if (closure->shadowed == NULL) { closure->shadowed = (jl_value_t*)oldentry; }