macos: miscompile/link with nix `ld64` #36281

issue fanquake opened this issue on September 16, 2026
  1. fanquake commented at 9:13 PM on September 16, 2026: member

    Reported by multiple devs here: #36246 (comment)

  2. fanquake added the label macOS on Sep 16, 2026
  3. maflcko added the label Build system on Sep 17, 2026
  4. maflcko added the label Upstream on Sep 17, 2026
  5. maflcko commented at 5:31 AM on September 17, 2026: member

    It would be good to bisect/fix/report this upstream.

    An alternative would be to partially/temporarily revert fa74f58a262096f25d5a3a4ec4951f4ce2a31792, but without knowing the exact macOS bug, it is hard to decide which parts to revert for how long ...?

  6. janb84 commented at 7:01 AM on September 17, 2026: contributor

    It would be good to bisect/fix/report this upstream.

    An alternative would be to partially/temporarily revert fa74f58, but without knowing the exact macOS bug, it is hard to decide which parts to revert for how long ...?

    Only the wallet.h part (if we choose to do so) the inline-ing of the 2 lines that depend on each other that's the "issue"

  7. maflcko commented at 7:20 AM on September 17, 2026: member

    P2WSH_OP_TRUE in the tests also depends on the prior global, which seems to be the same pattern, no?

  8. janb84 commented at 7:57 AM on September 17, 2026: contributor

    P2WSH_OP_TRUE in the tests also depends on the prior global, which seems to be the same pattern, no?

    yes you are correct, missed that because in #36246 it isn't causing an issue, in an other PR it is. The bug is also link-order dependent so it will not show in every PR (depending on the changes)

  9. maflcko commented at 8:11 AM on September 17, 2026: member

    in an other PR it is

    Ah interesting. Do you recall the test error log? I presume the P2WSH_OP_TRUE tests failed?

    The bug is also link-order dependent so it will not show in every PR (depending on the changes)

    ugh. I guess that makes it harder to bisect/fix/report this upstream.

    I guess my new recommendation would be to revert https://github.com/bitcoin/bitcoin/commit/fa74f58a262096f25d5a3a4ec4951f4ce2a31792 wholesale for now (to err on the safe side for 32.x) and then re-apply it for 33.x later on.

    This should buy enough time to debug this on macOS.

  10. sedited commented at 9:03 AM on September 17, 2026: contributor

    I guess my new recommendation would be to revert https://github.com/bitcoin/bitcoin/commit/fa74f58a262096f25d5a3a4ec4951f4ce2a31792 wholesale for now (to err on the safe side for 32.x) and then re-apply it for 33.x later on. @maflcko do you want to open a pull request for that?

  11. maflcko commented at 9:19 AM on September 17, 2026: member

    Sure, done. Only reverted the ones with dependencies. The others should be fine, as we already have stuff like src/protocol.h:274:inline const std::array ALL_NET_MESSAGE_TYPES{std::to_array<std::string>({ for a long time.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-09-23 05:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me