Skip to content

Avoid arm64 parser segfaults#2964

Merged
plajjan merged 1 commit into
mainfrom
fix-parser-arm64-segfault
Jun 22, 2026
Merged

Avoid arm64 parser segfaults#2964
plajjan merged 1 commit into
mainfrom
fix-parser-arm64-segfault

Conversation

@plajjan

@plajjan plajjan commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

GHC 9.8.4 on arm64 can crash in RTS apply stubs when concurrent parser evaluation touches parser closures that full laziness has floated into shared top-level values. Compile Acton.Parser with -fno-full-laziness so those closures stay local to each parse while preserving normal parser and compiler concurrency.

I don't quite know why this hits us just in the parser (or well, at all, bug I guess), but this fix certainly seems to have a good measurable effect and it improves runtime performance ever so slightly, though memory usage increases somewhat.

Concurrent parser evaluation on arm64 can crash in GHC RTS apply
stubs when GHC 9.8.4 floats parser subexpressions into shared
closures.

Compile Acton.Parser with -fno-full-laziness so those parser
closures stay local to each parse. This preserves parser and compiler
concurrency while avoiding the observed null apply-stub faults.
@plajjan plajjan marked this pull request as ready for review June 22, 2026 20:07
@plajjan plajjan merged commit 7b6a5e2 into main Jun 22, 2026
55 checks passed
@plajjan plajjan deleted the fix-parser-arm64-segfault branch June 22, 2026 20:16
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