Skip to content

Add build with hardened flag #2396

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

m271828
Copy link

@m271828 m271828 commented May 6, 2025

Issues:

Addresses (aws/aws-lc-rs#614)

Description of changes:

Adds a build with GCC-14 on Linux using the hardened flag to prevent regressions.

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.

@m271828 m271828 marked this pull request as ready for review May 6, 2025 10:00
@m271828 m271828 requested a review from a team as a code owner May 6, 2025 10:00
@m271828 m271828 requested a review from justsmth May 6, 2025 10:00
@m271828
Copy link
Author

m271828 commented May 6, 2025

General CI Tests / gcc-14-hardened (14, 0) is the test that currently runs (since FIPS is disabled on GCC 14). Passing output here: https://github.com/aws/aws-lc/actions/runs/14856703315/job/41711890198?pr=2396

@codecov-commenter
Copy link

codecov-commenter commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.80%. Comparing base (b0e8fbc) to head (534381c).
Report is 21 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2396      +/-   ##
==========================================
+ Coverage   78.78%   78.80%   +0.02%     
==========================================
  Files         620      621       +1     
  Lines      108077   108432     +355     
  Branches    15349    15389      +40     
==========================================
+ Hits        85153    85455     +302     
- Misses      22266    22310      +44     
- Partials      658      667       +9     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@m271828 m271828 requested a review from justsmth May 14, 2025 23:38
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
run: |
cmake -DCMAKE_C_FLAGS='-O2 -fhardened -Wno-error=hardened' -S. -Bbuild
cmake --build ./build --target all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use the run_tests target so that we verify the tests pass with this build configuration?

# TODO: Re-enable gcc-14/FIPS build once delocator updated
if: ${{ !( matrix.gccversion == '14' && matrix.fips == '1' ) }}
run: |
cmake -DCMAKE_C_FLAGS='-O2 -fhardened -Wno-error=hardened' -S. -Bbuild
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what errors do we see with just -O2 -fhardened. Are these errors things we can fix in our code?

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