Skip to content

Commit

Permalink
precompile: avoid a potential crash when adding methods
Browse files Browse the repository at this point in the history
fixes #29859
  • Loading branch information
vtjnash committed Apr 6, 2020
1 parent a965580 commit 0b642e7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0b642e7

Please sign in to comment.