Skip to content

Commit 8a55a27

Browse files
authored
precompile: avoid a potential crash when adding methods (JuliaLang#35378)
fixes JuliaLang#29859
1 parent 1728ada commit 8a55a27

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
@@ -1356,7 +1356,8 @@ static int check_ambiguous_visitor(jl_typemap_entry_t *oldentry, struct typemap_
13561356

13571357
// ok: record that this method definition is being partially replaced
13581358
// (either with a real definition, or an ambiguity error)
1359-
if (shadowed) {
1359+
// be careful not to try to scan something from the current dump-reload though
1360+
if (shadowed && oldentry->min_world != closure->newentry->min_world) {
13601361
if (closure->shadowed == NULL) {
13611362
closure->shadowed = (jl_value_t*)oldentry;
13621363
}

0 commit comments

Comments
 (0)