Skip to content

fix(tests): keep DWARF unwind tables in the future_error test on macOS - #11808

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
jotitadev:fix/macos-future-category-dwarf-unwind
Oct 28, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
jotitadev:fix/macos-future-category-dwarf-unwind

Conversation

@jotitadev

Copy link
Copy Markdown
Contributor

What

guest_future_category aborts on macOS in CheckFutureError:

[libc] unhandled exception 'St12future_error' thrown from 0x...
terminate called after throwing an instance of 'std::future_error'
  what():  future already retrieved

_Throw_future_error and the future_error vtable's raise slot throw through libc's __cxa_throw, and the test catches in its own frames. libc's unwinder walks host frames with their DWARF FDEs. On macOS the linker describes the test's frames with compact unwind (__unwind_info) and keeps no __eh_frame, so the unwinder cannot step into the catching frame and the exception reaches terminate. This is the same case #8311 fixed for guest_bad_optional_access.

The test target now calls configure_macos_unwind, next to configure_windows_unwind. It is a no-op on other hosts.

Tested

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none for the change. Building the test on macOS needs the open macOS series listed above.
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review matches the existing configure_macos_unwind pattern already used by guest_bad_optional_access and unwind_callback_abi; the helper adds the DWARF unwind compile flag and disables compact unwind only on Apple, so this target-specific addition is appropriately scoped. I also confirmed the current-main merge tree is clean. I am leaving this as a comment review rather than approval until the two macOS register-context jobs (Debug and Release) and macOS relinker checks finish; they are still pending. The Linux/Windows and ASan checks currently pass.

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/CMakeLists.txt
PR 6085 core/libs/prx/libc/CMakeLists.txt
PR 6713 core/libs/prx/libc/CMakeLists.txt
PR 7081 core/libs/prx/libc/CMakeLists.txt
PR 7447 core/libs/prx/libc/CMakeLists.txt
PR 7715 core/libs/prx/libc/CMakeLists.txt
PR 8150 core/libs/prx/libc/CMakeLists.txt
PR 8937 core/libs/prx/libc/CMakeLists.txt
PR 9775 core/libs/prx/libc/CMakeLists.txt
PR 9929 core/libs/prx/libc/CMakeLists.txt
PR 10324 core/libs/prx/libc/CMakeLists.txt
PR 11625 core/libs/prx/libc/CMakeLists.txt
PR 11872 core/libs/prx/libc/CMakeLists.txt
PR 11969 core/libs/prx/libc/CMakeLists.txt

@babyhuey

Copy link
Copy Markdown
Contributor

Windows run of this head 4e4de2cb958, merged onto main 5d52b06ff3d (clean merge, local only), with the selection CI's skipped Windows product job uses: Windows 11, Ryzen 7 5800X, RTX 3080, WinLibs GCC 15.2, Release, BUILD_TESTING=ON. The tree was configured fresh after the merge, then select_tests.py select / ninja -f select.ninja selected / --target libs / select_tests.py ctest --parallel 4 --timeout 120.

  • Selected 2597 tests: 1887 pass, 0 fail, 710 skip. No failures. 5d52b06ff3d itself skips the same tests on this machine.

AI-assisted: yes (Claude Code)

@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@adriadam10
adriadam10 merged commit b9eafb0 into boykopovar:main Oct 28, 2026
18 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked that configure_macos_unwind is the helper already used by guest_bad_optional_access_tests and unwind_callback_abi_tests, that it is a no-op off Apple, and that CI and babyhuey's Windows run are green; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants