mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-20 23:30:54 +00:00
[asan] Stop leaking X86Operands.
llvm-svn: 208400
This commit is contained in:
parent
b7f1c6ff3e
commit
8bbadc0383
@ -192,8 +192,8 @@ void X86AddressSanitizer64::InstrumentMemOperandImpl(X86Operand *Op,
|
||||
Inst.addOperand(MCOperand::CreateReg(X86::RSP));
|
||||
|
||||
const MCExpr *Disp = MCConstantExpr::Create(-128, Ctx);
|
||||
X86Operand *Op =
|
||||
X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc());
|
||||
std::unique_ptr<X86Operand> Op(
|
||||
X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc()));
|
||||
Op->addMemOperands(Inst, 5);
|
||||
EmitInstruction(Out, Inst);
|
||||
}
|
||||
@ -221,8 +221,8 @@ void X86AddressSanitizer64::InstrumentMemOperandImpl(X86Operand *Op,
|
||||
Inst.addOperand(MCOperand::CreateReg(X86::RSP));
|
||||
|
||||
const MCExpr *Disp = MCConstantExpr::Create(128, Ctx);
|
||||
X86Operand *Op =
|
||||
X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc());
|
||||
std::unique_ptr<X86Operand> Op(
|
||||
X86Operand::CreateMem(0, Disp, X86::RSP, 0, 1, SMLoc(), SMLoc()));
|
||||
Op->addMemOperands(Inst, 5);
|
||||
EmitInstruction(Out, Inst);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user