authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-25 21:00:02-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-25 21:00:02-04:00
log5ec6a0ea028cd26e9042d4d7a944d5b085f921a4
treed2bd5c027832d60d57381ec1e86f78c3c2158fa0
parentfae6cf09619e7a8e64f61b84cca7d9fcd471262f
signaturelock-open Commit is signed but in an unrecognized format.

fix an invalid free having to do with bound functions

this should fix the drone CI failure

1 files changed, 3 insertions(+), 0 deletions(-)

src/ir.cpp+3
...@@ -13028,6 +13028,9 @@ static IrInstGen *ir_const_fn(IrAnalyze *ira, IrInst *source_instr, ZigFn *fn_en...@@ -13028,6 +13028,9 @@ static IrInstGen *ir_const_fn(IrAnalyze *ira, IrInst *source_instr, ZigFn *fn_en
13028static IrInstGen *ir_const_bound_fn(IrAnalyze *ira, IrInst *src_inst, ZigFn *fn_entry, IrInstGen *first_arg,13028static IrInstGen *ir_const_bound_fn(IrAnalyze *ira, IrInst *src_inst, ZigFn *fn_entry, IrInstGen *first_arg,
13029 IrInst *first_arg_src)13029 IrInst *first_arg_src)
13030{13030{
13031 // This is unfortunately required to avoid improperly freeing first_arg_src
13032 ira_ref(ira);
13033
13031 IrInstGen *result = ir_const(ira, src_inst, get_bound_fn_type(ira->codegen, fn_entry));13034 IrInstGen *result = ir_const(ira, src_inst, get_bound_fn_type(ira->codegen, fn_entry));
13032 result->value->data.x_bound_fn.fn = fn_entry;13035 result->value->data.x_bound_fn.fn = fn_entry;
13033 result->value->data.x_bound_fn.first_arg = first_arg;13036 result->value->data.x_bound_fn.first_arg = first_arg;