Skip to content

Ensure ConstPointers don't outlive parent #693

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 3 commits into
base: main
Choose a base branch
from

Conversation

justsmth
Copy link
Contributor

@justsmth justsmth commented Feb 10, 2025

Description of changes:

  • Use lifetimes to prevent a "child" object being used after its "parent" is out of scope.
  • Move most non-mutating functionality from LcPtr<EVP_PKEY> to ConstPointer<'_, EVP_PKEY>

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 Feb 10, 2025

Codecov Report

Attention: Patch coverage is 78.54077% with 50 lines in your changes missing coverage. Please review.

Project coverage is 92.39%. Comparing base (c358484) to head (90f0ca9).
Report is 218 commits behind head on main.

Files with missing lines Patch % Lines
aws-lc-rs/src/ed25519.rs 64.70% 0 Missing and 12 partials ⚠️
aws-lc-rs/src/ec.rs 57.89% 3 Missing and 5 partials ⚠️
aws-lc-rs/src/ec/encoding.rs 65.00% 3 Missing and 4 partials ⚠️
aws-lc-rs/src/agreement.rs 66.66% 1 Missing and 3 partials ⚠️
aws-lc-rs/src/evp_pkey.rs 93.61% 2 Missing and 1 partial ⚠️
aws-lc-rs/src/rsa/key.rs 76.92% 0 Missing and 3 partials ⚠️
aws-lc-rs/src/pqdsa/key_pair.rs 60.00% 0 Missing and 2 partials ⚠️
aws-lc-rs/src/pqdsa/signature.rs 0.00% 0 Missing and 2 partials ⚠️
aws-lc-rs/src/ptr.rs 94.59% 2 Missing ⚠️
aws-lc-rs/src/rsa/encoding.rs 60.00% 0 Missing and 2 partials ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #693      +/-   ##
==========================================
- Coverage   95.80%   92.39%   -3.41%     
==========================================
  Files          61       71      +10     
  Lines        8143     9061     +918     
  Branches        0     9061    +9061     
==========================================
+ Hits         7801     8372     +571     
- Misses        342      423      +81     
- Partials        0      266     +266     

☔ 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.

@justsmth justsmth force-pushed the const-ptr-lifetimes branch 2 times, most recently from d1787e0 to caab501 Compare March 5, 2025 14:28
@justsmth justsmth force-pushed the const-ptr-lifetimes branch from caab501 to ae6dd2d Compare March 28, 2025 17:34
@justsmth justsmth changed the title [DRAFT] Ensure ConstPointers don't outlive parent Ensure ConstPointers don't outlive parent Mar 28, 2025
@justsmth justsmth marked this pull request as ready for review March 28, 2025 17:42
@justsmth justsmth requested a review from a team as a code owner March 28, 2025 17:42
@justsmth justsmth force-pushed the const-ptr-lifetimes branch from 7f97985 to e6757c2 Compare April 25, 2025 13:08
@justsmth justsmth force-pushed the const-ptr-lifetimes branch from e6757c2 to 00871db Compare May 7, 2025 20:19
@justsmth justsmth force-pushed the const-ptr-lifetimes branch from 00871db to 90f0ca9 Compare May 9, 2025 13:02
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.

2 participants