Bug 1800621 - Increase slop to prevent thunk out of range. r=firefox-build-system-reviewers,sergesanspaille
Differential Revision: https://phabricator.services.mozilla.com/D162259
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"revert-llvmorg-14-init-11890-gf86deb18cab6.patch",
|
||||
"win64-ret-null-on-commitment-limit_clang_14.patch",
|
||||
"llvmorg-16-init-7778-g232e0a011e8c.patch",
|
||||
"llvmorg-16-init-10850-gff111a997f1b.patch",
|
||||
"compiler-rt-rss-limit-heap-profile.patch",
|
||||
"profdata-compat.patch"
|
||||
]
|
||||
|
||||
35
build/build-clang/llvmorg-16-init-10850-gff111a997f1b.patch
Normal file
35
build/build-clang/llvmorg-16-init-10850-gff111a997f1b.patch
Normal file
@@ -0,0 +1,35 @@
|
||||
From ff111a997f1b40a531bc68b543542746d4b08a5f Mon Sep 17 00:00:00 2001
|
||||
From: Mike Hommey <mh@glandium.org>
|
||||
Date: Wed, 16 Nov 2022 21:31:28 -0500
|
||||
Subject: [PATCH] [lld-macho] Increase slop to prevent thunk out of range
|
||||
again.
|
||||
|
||||
Building Firefox with -O0 on arm64 mac recently hit the
|
||||
"FIXME: thunk range overrun" error on multiple occasions.
|
||||
|
||||
Doubling or tripling slop was not sufficient in some cases, so
|
||||
quadruple it.
|
||||
|
||||
Reviewed By: #lld-macho, int3
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D138174
|
||||
---
|
||||
lld/MachO/ConcatOutputSection.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lld/MachO/ConcatOutputSection.cpp b/lld/MachO/ConcatOutputSection.cpp
|
||||
index e97f1e9b9ddd..cbd3a2492d25 100644
|
||||
--- a/lld/MachO/ConcatOutputSection.cpp
|
||||
+++ b/lld/MachO/ConcatOutputSection.cpp
|
||||
@@ -246,7 +246,7 @@ void TextOutputSection::finalize() {
|
||||
// contains several branch instructions in succession, then the distance
|
||||
// from the current position to the position where the thunks are inserted
|
||||
// grows. So leave room for a bunch of thunks.
|
||||
- unsigned slop = 256 * thunkSize;
|
||||
+ unsigned slop = 1024 * thunkSize;
|
||||
while (finalIdx < endIdx && addr + size + inputs[finalIdx]->getSize() <
|
||||
isecVA + forwardBranchRange - slop)
|
||||
finalizeOne(inputs[finalIdx++]);
|
||||
--
|
||||
2.38.1.1.g6d9df9d320
|
||||
|
||||
Reference in New Issue
Block a user