Skip to content

Commit c89189d

Browse files
yozhumahesh-attarde
authored andcommitted
[BOLT] Don't check address past end of function for data/code marker annotation (llvm#159210)
We want to annotate function with data and code markers whose addresses fall within the range of the function, so setting `CheckPastEnd` to false.
1 parent 117c7e2 commit c89189d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bolt/lib/Rewrite/RewriteInstance.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1312,7 +1312,9 @@ void RewriteInstance::discoverFileObjects() {
13121312

13131313
// Annotate functions with code/data markers in AArch64
13141314
for (auto &[Address, Type] : MarkerSymbols) {
1315-
auto *BF = BC->getBinaryFunctionContainingAddress(Address, true, true);
1315+
auto *BF = BC->getBinaryFunctionContainingAddress(Address,
1316+
/*CheckPastEnd*/ false,
1317+
/*UseMaxSize*/ true);
13161318

13171319
if (!BF) {
13181320
// Stray marker

0 commit comments

Comments
 (0)