Repository navigation
Fix the Linux ARM64 JIT crash and GCC 14 build, and test ARM64 natively in CI - #4
Merged
Merged
Conversation
GCC 14.2 at -O3 reports -Werror=stringop-truncation at nvs_alloc's strncpy of the key, which stops a default build. The warning is a false positive: the caller's key is at most 15 characters and the field holds 16. snprintf states the same bounded, terminated copy without tripping it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ARM64 instruction caches are not coherent with data writes, but only the Apple path invalidated after emitting a block or patching a chain site. On Linux ARM64 the CPU could execute stale bytes, and the unit suite died with SIGILL at the first test that ran compiled code. Route both mutation paths through one helper that uses __builtin___clear_cache off Apple. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI only cross-compiled the arm64 JIT backend, so code that built but crashed at runtime went unnoticed. Add a job on an ARM64 runner with gcc-14, which also covers warnings the default gcc does not raise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
levkropp
force-pushed
the
fix/linux-arm64-gcc14
branch
from
November 6, 2026 22:52
dc5db36 to
ab9c400
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs on master that CI couldn't see, plus a job that covers them. Both were found while testing #3 on Linux ARM64.
Changes
src/rom_stubs.c:2064with-Werror=stringop-truncation. It's a false positive, sonvs_allocnow usessnprintf.jit.conly invalidated the instruction cache on Apple, so on Linux ARM64 the suite died withIllegal instructionat the first test that ran compiled code. Block emission and chain patching now share one helper that uses__builtin___clear_cacheoff Apple.unit tests (aarch64, gcc-14)job onubuntu-24.04-arm, because ARM64 was only cross-compiled before. The cross-compile job stays, though it's now largely redundant.Testing
I ran CI's build, unit and CLI trace steps with strict flags on this branch:
Before these changes, the same Linux setup failed to build, and with only the
rom_stubs.cfix the unit suite crashed withIllegal instruction.This branch doesn't include #3. The Linux run was in a VM on Apple Silicon, so this PR's new job is the first run on a real ARM64 Linux runner.
🤖 Generated with Claude Code