cfallin opened PR #5727 from fix-inst-clone
to main
:
When investigating #5716, I found that rematerialization of a
call
, in
addition to blowing up for other reasons, caused aliasing of the varargs
list (theEntityList
in theListPool
), such that editing the args of
the second copy of the call instruction inadvertently updated the first
as well.This PR modifies
DataFlowGraph::clone_inst
so that it always clones
the varargs list if present. This shouldn't have any functional impact
on Cranelift today, because we don't rematerialize any instructions with
varargs; but it's important to get it right to avoid a bug later!(Stacked on top of #5726.)
cfallin requested elliottt for a review on PR #5727.
cfallin requested fitzgen for a review on PR #5727.
cfallin requested jameysharp for a review on PR #5727.
cfallin updated PR #5727 from fix-inst-clone
to main
.
cfallin edited PR #5727 from fix-inst-clone
to main
:
When investigating #5716, I found that rematerialization of a
call
, in
addition to blowing up for other reasons, caused aliasing of the varargs
list (theEntityList
in theListPool
), such that editing the args of
the second copy of the call instruction inadvertently updated the first
as well.This PR modifies
DataFlowGraph::clone_inst
so that it always clones
the varargs list if present. This shouldn't have any functional impact
on Cranelift today, because we don't rematerialize any instructions with
varargs; but it's important to get it right to avoid a bug later!
cfallin updated PR #5727 from fix-inst-clone
to main
.
jameysharp submitted PR review.
cfallin has enabled auto merge for PR #5727.
cfallin merged PR #5727.
Last updated: Dec 23 2024 at 12:05 UTC