Skip to content

fix: prevent startup crash on Apple M5 Macs - #80

Merged
rdlauer merged 1 commit into
masterfrom
rob-fix-macos-startup-crash
Oct 29, 2026
Merged

rdlauer merged 1 commit into
masterfrom
rob-fix-macos-startup-crash

Conversation

@rdlauer

@rdlauer rdlauer commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Summary

notecard and notehub crash with a segfault at startup on Apple M5 Macs (reproduced on an M5 Pro, macOS 27.2, including the current Homebrew cask). The crash comes from github.com/shoenig/go-m1cpu v0.1.x, pulled in through note-go → gopsutil/v3; it only affects darwin builds with cgo enabled, which is how releases are built.

This pins go-m1cpu v0.2.4, which fixes M5, M5 Pro and M5 Max handling and reports the correct CPU frequency (used for cpu_mhz in note-go's user agent). go-m1cpu v0.2.3+ requires Go 1.26, so the go directive moves from 1.25.0 to 1.26 in go.mod and lib/go.mod.

This change was accidentally pushed straight to master as 2a8252d and reverted in 7fede9e; this PR resubmits it for review.

Testing

  • Both modules build, vet and pass tests on macOS (cgo on, M5 Pro) and on Linux (Go 1.26.10).
  • notecard and notehub start normally on the M5 Pro; the same binaries built with v0.1.7 segfault.
  • Go 1.25 runners (master's current workflows) automatically switch to a 1.26 toolchain, so CI passes with or without feat: ci improvements #79. Both should merge before the next release.

note-go itself still pins the crashing version. That has been handed off to the note-go/hub owners; this pin overrides it for note-cli in the meantime.

🤖 Generated with Claude Code

Darwin cgo builds of notecard and notehub segfault during init on Apple M5
chips in github.com/shoenig/go-m1cpu v0.1.x, pulled in through note-go and
gopsutil/v3. Pin go-m1cpu v0.2.4, which fixes M5, M5 Pro and M5 Max
handling and reports the correct CPU frequency. go-m1cpu v0.2.3+ requires
Go 1.26, so the go directive moves from 1.25.0 to 1.26 in both modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rdlauer
rdlauer requested a review from Bucknalla October 29, 2026 16:46
@rdlauer
rdlauer merged commit ad7c767 into master Oct 29, 2026
1 check passed
@rdlauer
rdlauer deleted the rob-fix-macos-startup-crash branch October 29, 2026 17:55
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.

2 participants