提交 8ebab600 编写于 作者: D Derek Parker

Copy InitialInstructions to prevent mutation

上级 20c9e92c
......@@ -119,6 +119,8 @@ var fnlookup = map[byte]instruction{
}
func executeCIEInstructions(cie *CommonInformationEntry) *FrameContext {
initialInstructions := make([]byte, len(cie.InitialInstructions))
copy(initialInstructions, cie.InitialInstructions)
frame := &FrameContext{
cie: cie,
regs: make(map[uint64]DWRule),
......@@ -126,7 +128,7 @@ func executeCIEInstructions(cie *CommonInformationEntry) *FrameContext {
prevRegs: make(map[uint64]DWRule),
codeAlignment: cie.CodeAlignmentFactor,
dataAlignment: cie.DataAlignmentFactor,
buf: bytes.NewBuffer(cie.InitialInstructions),
buf: bytes.NewBuffer(initialInstructions),
}
frame.ExecuteDwarfProgram()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册