Repository navigation
Revert "Enable -mbranch-protection=pac-ret on ARM" - #131765
Merged
alexey-milovidov merged 1 commit intoNov 15, 2026
Merged
Conversation
…ranch-protection-arm" This reverts commit 46106b1, reversing changes made to d88a8f1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
Collaborator
Author
|
cc @alexey-milovidov, could you review this? This reverts #119685, which crashes the server with SIGILL on AArch64 cores without PAuth (e.g. Graviton2) on the first SimSIMD call: the reproducer crashes at 79929b2, the first build with it, and not at its first parent d88a8f1. The fix in #131762 is the alternative. |
Contributor
Merged
via the queue into
ClickHouse:master
with commit Nov 15, 2026
da3abaf
570 of 572 checks passed
alexey-milovidov
added a commit
that referenced
this pull request
Nov 15, 2026
#119685 was reverted in #131765 because the `arm_release` binary died with SIGILL on cores without `FEAT_PAuth` (Graviton2, Ampere Altra) on the first SimSIMD call: SimSIMD compiles its CPU probe `_simsimd_capabilities_arm` and five bf16 NEON kernels for ARMv8.3+, where clang folds `autiasp; ret` into `retaa`, which is not in the `NOP` space. Build `_simsimd` with `-mbranch-protection=none` (the same fix as #131762). Compiled with the `arm_release` flags, `c/lib.c` goes from 7 `retaa` to 0. Add a check to the `arm_release` compatibility check that scans the code sections of the packaged binary for `retaa` and `retab` and names the functions through `system.symbols`. A test run on Graviton3 would never notice the next such case. On the `arm_release` package of #131745 (pac-ret on) it reports exactly the 6 SimSIMD functions; on that of d88a8f1 (the master commit before #119685) it passes. Closes: #131748 Related: #131762 Related: #131765 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Reverts #119685
Related: #131748
Related: #119685
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Description
#119685 introduced a server crash (SIGILL on AArch64 cores without FEAT_PAuth, e.g. Graviton2, on the first SimSIMD call: an INSERT into a table with a
vector_similarityindex or a QBit*Transposeddistance function), reported in #131748. Withpac-ret, the SimSIMD CPU probe, compiled forarmv8.5-a+sve, returns withretaa, which is undefined without FEAT_PAuth. The reproducer crashes at 79929b2, the first master build with #119685 (its only other change is a test file), and not at its first parent d88a8f1 (CIarm_releasebuilds under qemu-user 11.1-cpu neoverse-n1, 5/5 vs 0/10 runs), and still crashes on master 6ea176f. An alternative fix is open in #131762.Proof
SIGILL at the
retaathat ends_simsimd_capabilities_arm(simsimd.h:650). qemu 11.1 trapsretaawithout FEAT_PAuth (qemu 8.1 to 10.0 run it asret);-cpu maxhas PAuth.-cpu79929b2 has 6
retaa, all in SimSIMD (the probe and 5 bf16 NEON kernels); d88a8f1 has none. On this revert,contrib/SimSIMD/c/lib.ccompiled with thearm_releaseflags has noretaa(6 with-mbranch-protection=pac-retadded).🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131765]
Version info
26.11.1.2339-master(included in26.11and later)