mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-01 01:31:26 +00:00
[BOLT][AArch64] add lock to FixRelaxations pass
Since the pass is multithreaded, BC.Ctx must be protected. Otherwise we get crashes when processing. Reviewed by: yota9 Differential Revision: https://reviews.llvm.org/D141465
This commit is contained in:
parent
6f00e11657
commit
c8ff968b84
@ -39,6 +39,7 @@ void FixRelaxations::runOnFunction(BinaryFunction &BF) {
|
||||
if (!Symbol || AdrpSymbol == Symbol)
|
||||
continue;
|
||||
|
||||
auto L = BC.scopeLock();
|
||||
const int64_t Addend = BC.MIB->getTargetAddend(Add);
|
||||
BC.MIB->setOperandToSymbolRef(Adrp, /*OpNum*/ 1, Symbol, Addend,
|
||||
BC.Ctx.get(), ELF::R_AARCH64_NONE);
|
||||
|
Loading…
Reference in New Issue
Block a user