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

Avoid compiler warning #1981

Merged
merged 2 commits into from
Nov 12, 2024
Merged

Avoid compiler warning #1981

merged 2 commits into from
Nov 12, 2024

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Nov 11, 2024

Issues:

Addresses aws/aws-lc-rs#574

Context

The compiler cannot always confirm that the array indices used are within the required bounds. On certain platform, specifically powerpc64le in this case, the compiler may generate a warning about it. For our build, warnings are treated as errors thus causing compilation to fail.

Description of changes:

Adds sanity checks to several locations in gcm.c that abort if the logic would reference an out-of-bounds index of an array.

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.

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 78.77%. Comparing base (c9d48a6) to head (c64f830).
Report is 15 commits behind head on main.

Files with missing lines Patch % Lines
crypto/fipsmodule/modes/gcm.c 50.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1981      +/-   ##
==========================================
- Coverage   78.79%   78.77%   -0.03%     
==========================================
  Files         590      590              
  Lines      101506   101512       +6     
  Branches    14401    14403       +2     
==========================================
- Hits        79979    79962      -17     
- Misses      20891    20915      +24     
+ Partials      636      635       -1     

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

@justsmth justsmth changed the title [DRAFT] Avoid compiler warning Avoid compiler warning Nov 11, 2024
@justsmth justsmth marked this pull request as ready for review November 11, 2024 18:59
@justsmth justsmth requested a review from a team as a code owner November 11, 2024 18:59
@justsmth justsmth merged commit 70e660f into aws:main Nov 12, 2024
113 of 116 checks passed
@justsmth justsmth deleted the powerpc64le-gcc-12.2 branch November 12, 2024 18:28
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.

4 participants