Skip to content

posix-arm64: fix native Apple Silicon crash#26

Open
m0spak wants to merge 1 commit into9fans:mainfrom
m0spak:fix-arm64-darwin-crash
Open

posix-arm64: fix native Apple Silicon crash#26
m0spak wants to merge 1 commit into9fans:mainfrom
m0spak:fix-arm64-darwin-crash

Conversation

@m0spak
Copy link
Copy Markdown

@m0spak m0spak commented Apr 6, 2026

Summary

This PR adds a minimal native Apple Silicon fix for classic 9fans/drawterm.

It keeps the classic codebase and auth behaviour, but updates the arm64 machdep path to avoid the runtime crash seen on macOS Apple Silicon.

Changes

  • add posix-arm64/
  • replace posix-arm64/getcallerpc.c with a built-in based implementation
  • replace posix-arm64/tas.c with a compiler-provided atomic implementation

Why

The existing arm64 work in earlier PRs does not appear to be merged upstream, and native Apple Silicon builds can fail at runtime.

This change keeps the fix small and focused on the arm64 machdep layer needed for CONF=osx-x11.

Tested

Tested on Apple M4 Pro, macOS Sequoia 15.7.5 (24G624), using CONF=osx-x11 X11=/opt/X11.

Verified that the resulting binary is native arm64, launches successfully, and connects to a current 9legacy cpu/auth server.

Notes

This is a fresh PR instead of updating #9 because I wanted a small branch based on current main.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant