Skip to content

Commit

Permalink
Merge pull request #19251 from JuliaLang/jb/typecacheunlock
Browse files Browse the repository at this point in the history
fix a missing `unlock` of `typecache_lock`
  • Loading branch information
vtjnash committed Nov 7, 2016
2 parents d16d994 + b56b7fc commit 02b6b0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jltypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2198,8 +2198,10 @@ static jl_value_t *inst_datatype(jl_datatype_t *dt, jl_svec_t *p, jl_value_t **i
jl_value_t *va = iparams[ntp - 1];
// return same `Tuple` object for types equal to it
if (ntp == 1 && jl_tparam0(va) == (jl_value_t*)jl_any_type &&
jl_tparam1(va) == jl_tparam1(jl_tparam0(jl_anytuple_type)))
jl_tparam1(va) == jl_tparam1(jl_tparam0(jl_anytuple_type))) {
if (cacheable) JL_UNLOCK(&typecache_lock); // Might GC
return (jl_value_t*)jl_anytuple_type;
}
if (jl_is_long(jl_tparam1(va))) {
ssize_t nt = jl_unbox_long(jl_tparam1(va));
if (nt < 0)
Expand Down

0 comments on commit 02b6b0f

Please sign in to comment.