Skip to content

Commit

Permalink
fix a possible segfault during static compilation (JuliaLang#37406)
Browse files Browse the repository at this point in the history
Similar to JuliaLang#37386, for 1.6-dev
  • Loading branch information
JeffBezanson committed Sep 9, 2020
1 parent e0ca7ce commit 94249f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/aotcompile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ static void jl_ci_cache_lookup(const jl_cgparams_t &cgparams, jl_method_instance
}
else {
*src_out = jl_type_infer(mi, world, 0);
codeinst = jl_get_method_inferred(mi, (*src_out)->rettype, (*src_out)->min_world, (*src_out)->max_world);
if ((*src_out)->inferred && !codeinst->inferred)
codeinst->inferred = jl_nothing;
if (*src_out) {
codeinst = jl_get_method_inferred(mi, (*src_out)->rettype, (*src_out)->min_world, (*src_out)->max_world);
if ((*src_out)->inferred && !codeinst->inferred)
codeinst->inferred = jl_nothing;
}
}
}
*ci_out = codeinst;
Expand Down

0 comments on commit 94249f4

Please sign in to comment.