[all-commits] [llvm/llvm-project] 79942d: [lld-macho] Fix compact unwind output for 32 bit b...

David Spickett via All-commits all-commits at lists.llvm.org
Mon Jul 11 01:21:18 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 79942d32a6318555feadaefea31e156a37b6e143
      https://github.com/llvm/llvm-project/commit/79942d32a6318555feadaefea31e156a37b6e143
  Author: David Spickett <david.spickett at linaro.org>
  Date:   2022-07-11 (Mon, 11 Jul 2022)

  Changed paths:
    M lld/MachO/UnwindInfoSection.cpp

  Log Message:
  -----------
  [lld-macho] Fix compact unwind output for 32 bit builds

This test was failing on our 32 bit build bot:
https://lab.llvm.org/buildbot/#/builders/178/builds/2463

This happened because in UnwindInfoSectionImpl::finalize
a decision is made whether to write out regular or compressed
unwind info.

One check in this does:
```
if (cuPtr->functionAddress >= functionAddressMax) {
        break;
```

Where cuPtr->functionAddress was uint64_t and functionAddressMax
was uintptr_t, which is 4 bytes on a 32 bit system.

Using uint64_t for functionAddressMax fixes this problem.
Presumably because at only 4 bytes, the max is much lower than
we expect. We're targetting 64 bit though so the size of the max
should match the size of the addresses.

Reviewed By: #lld-macho, int3

Differential Revision: https://reviews.llvm.org/D129363




More information about the All-commits mailing list