Our bot has been failing https://lab.llvm.org/buildbot/#/builders/178/builds/3967:
Assertion `isecEnd - isecVA <= forwardBranchRange && "should only finalize sections in jump range"' failed.
I think this is due to the use of size_t, which is 32 bit on 32 bit,
for a value used in some 64 bit address calculations. Which was added in
https://reviews.llvm.org/D144029.
Switching to uint64_t fixes the issues.
// grows. So leave room for a bunch of thunks.
unsigned slop = 256 * thunkSize;
while (finalIdx < endIdx) {
- size_t expectedNewSize = alignTo(addr + size, inputs[finalIdx]->align) +
+ uint64_t expectedNewSize = alignTo(addr + size, inputs[finalIdx]->align) +
inputs[finalIdx]->getSize();
if (expectedNewSize >= isecVA + forwardBranchRange - slop)
break;