-
Notifications
You must be signed in to change notification settings - Fork 130
fix(l1): fix illegal instructions in certain ARM processors #5143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
Lines of code reportTotal lines added: Detailed view |
Oppen
reviewed
Oct 31, 2025
crates/common/crypto/blake2f/mod.rs
Outdated
| mod tests { | ||
| use super::*; | ||
| #[test] | ||
| fn test_12r() { |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
12r?
Maybe call it blake2b_smoke.
Contributor
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 163a164
Oppen
approved these changes
Oct 31, 2025
azteca1998
approved these changes
Oct 31, 2025
MegaRedHand
approved these changes
Oct 31, 2025
pablodeymo
pushed a commit
that referenced
this pull request
Oct 31, 2025
**Motivation** During ARM testing, ethrex would crash on certain ARM CPUs. The backtrace of the program was in the blake2b precompile in `crates/common/crypto/blake2f/aarch64.rs`. The specific instruction that crashed was the [XAR instruction](https://developer.arm.com/documentation/ddi0602/2022-03/SIMD-FP-Instructions/XAR--Exclusive-OR-and-Rotate-), which the documentation states that "This instruction is implemented only when FEAT_SHA3 is implemented." **Description** - Added check to `BLAKE2_FUNC` lazy evaluator to check for the `sha3` feature in the user's cpu at runtime. **Notes on testing** On an ARM CPU without the feature `sha3` the commit `fba993c9b337ab2a89664f0f39260b40e25ac4c8` includes a failing unit test. After `21fb29e439261de5c9f275f54a9de218759daa2f` the test should work.
xqft
pushed a commit
that referenced
this pull request
Nov 11, 2025
**Motivation** During ARM testing, ethrex would crash on certain ARM CPUs. The backtrace of the program was in the blake2b precompile in `crates/common/crypto/blake2f/aarch64.rs`. The specific instruction that crashed was the [XAR instruction](https://developer.arm.com/documentation/ddi0602/2022-03/SIMD-FP-Instructions/XAR--Exclusive-OR-and-Rotate-), which the documentation states that "This instruction is implemented only when FEAT_SHA3 is implemented." **Description** - Added check to `BLAKE2_FUNC` lazy evaluator to check for the `sha3` feature in the user's cpu at runtime. **Notes on testing** On an ARM CPU without the feature `sha3` the commit `fba993c9b337ab2a89664f0f39260b40e25ac4c8` includes a failing unit test. After `21fb29e439261de5c9f275f54a9de218759daa2f` the test should work.
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.
Motivation
During ARM testing, ethrex would crash on certain ARM CPUs. The backtrace of the program was in the blake2b precompile in
crates/common/crypto/blake2f/aarch64.rs. The specific instruction that crashed was the XAR instruction, which the documentation states that "This instruction is implemented only when FEAT_SHA3 is implemented."Description
BLAKE2_FUNClazy evaluator to check for thesha3feature in the user's cpu at runtime.Notes on testing
On an ARM CPU without the feature
sha3the commitfba993c9b337ab2a89664f0f39260b40e25ac4c8includes a failing unit test. After21fb29e439261de5c9f275f54a9de218759daa2fthe test should work.