Skip to content
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

alignas(16) unsupported w/ GCC 7.2 for ARM32 #2086

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Dec 31, 2024

Issues:

  • Addresses: CryptoAlg-2718

Description of changes:

  • When targeting arm, GCC 7.2 claims to not support alignas(16) in C++ code.
...
.../arm-unknown-linux-musleabi/crypto/cipher_extra/aead_test.cc:835:54: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t key[EVP_AEAD_MAX_KEY_LENGTH + 1];
                                                      ^
/home/justsmth/workspace/CrossAWS-LC-FIPS/src/CrossAWS-LC-FIPS/build/private/buildroot/arm-unknown-linux-musleabi/crypto/cipher_extra/aead_test.cc:836:58: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t nonce[EVP_AEAD_MAX_NONCE_LENGTH + 1];
                                                          ^
/home/justsmth/workspace/CrossAWS-LC-FIPS/src/CrossAWS-LC-FIPS/build/private/buildroot/arm-unknown-linux-musleabi/crypto/cipher_extra/aead_test.cc:837:39: error: requested alignment 16 is larger than 8 [-Werror=attributes]
   alignas(16) uint8_t plaintext[32 + 1];
...

Call-outs:

  • We also use alignas(16) a few places in C code, but the compiler doesn't complain about those.
  • Compilation of AWS-LC FIPS with this same compiler/target still fails with this change, but for an apparently unrelated reason.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@justsmth justsmth requested a review from a team as a code owner December 31, 2024 14:03
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.75%. Comparing base (6aa30a9) to head (5407140).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2086      +/-   ##
==========================================
- Coverage   78.75%   78.75%   -0.01%     
==========================================
  Files         598      598              
  Lines      103653   103653              
  Branches    14720    14720              
==========================================
- Hits        81634    81629       -5     
- Misses      21365    21371       +6     
+ Partials      654      653       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@justsmth justsmth force-pushed the fix-arm32-alignment branch from 0ca89eb to 5407140 Compare January 3, 2025 12:37
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.

3 participants