Skip to content

Commit

Permalink
fix a likely GC root bug in jl_gf_invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Jan 5, 2015
1 parent d757543 commit df846de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1707,7 +1707,7 @@ jl_value_t *jl_gf_invoke(jl_function_t *gf, jl_tuple_t *types,
jl_tuple_t *tpenv=jl_null;
jl_tuple_t *newsig=NULL;
jl_tuple_t *tt=NULL;
JL_GC_PUSH3(&env, &newsig, &tt);
JL_GC_PUSH3(&tpenv, &newsig, &tt);

if (m->invokes == JL_NULL) {
m->invokes = new_method_table(mt->name);
Expand All @@ -1719,7 +1719,7 @@ jl_value_t *jl_gf_invoke(jl_function_t *gf, jl_tuple_t *types,

newsig = (jl_tuple_t*)m->sig;

if (env != (jl_value_t*)jl_false) {
if (m->tvars != jl_null) {
jl_value_t *ti =
lookup_match((jl_value_t*)tt, (jl_value_t*)m->sig, &tpenv, m->tvars);
assert(ti != (jl_value_t*)jl_bottom_type);
Expand Down

4 comments on commit df846de

@ViralBShah
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaBackports Should we backport this?

@JeffBezanson
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe.

@tkelman
Copy link
Contributor

@tkelman tkelman commented on df846de Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for 0.3.6 presumably, not 0.3.5?

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backported in 9c6bb24

Please sign in to comment.