authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-25 20:28:44-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-25 20:28:44-05:00
log6b436146a8065b3e19c11359df85a44dac269730
treeca8af3aa1b669886121931b0b426ff1068e64ae5
parent6cbea99ed6c0a87b4e4b779975f7f26738241280

fix invalid memory write in coroutines implementation


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

src/ir.cpp+1-1
...@@ -942,7 +942,7 @@ static IrInstruction *ir_build_const_promise_init(IrBuilder *irb, Scope *scope,...@@ -942,7 +942,7 @@ static IrInstruction *ir_build_const_promise_init(IrBuilder *irb, Scope *scope,
942 IrInstructionConst *const_instruction = ir_build_instruction<IrInstructionConst>(irb, scope, source_node);942 IrInstructionConst *const_instruction = ir_build_instruction<IrInstructionConst>(irb, scope, source_node);
943 const_instruction->base.value.type = struct_type;943 const_instruction->base.value.type = struct_type;
944 const_instruction->base.value.special = ConstValSpecialStatic;944 const_instruction->base.value.special = ConstValSpecialStatic;
945 const_instruction->base.value.data.x_struct.fields = allocate<ConstExprValue>(2);945 const_instruction->base.value.data.x_struct.fields = allocate<ConstExprValue>(field_count);
946 const_instruction->base.value.data.x_struct.fields[0].type = awaiter_handle_type;946 const_instruction->base.value.data.x_struct.fields[0].type = awaiter_handle_type;
947 const_instruction->base.value.data.x_struct.fields[0].special = ConstValSpecialStatic;947 const_instruction->base.value.data.x_struct.fields[0].special = ConstValSpecialStatic;
948 const_instruction->base.value.data.x_struct.fields[0].data.x_maybe = nullptr;948 const_instruction->base.value.data.x_struct.fields[0].data.x_maybe = nullptr;