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

Ensure ConstPointers don't outlive parent #693

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 79.07950% with 50 lines in your changes missing coverage. Please review.

Project coverage is 92.96%. Comparing base (c358484) to head (7f97985).
Report is 195 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 60.00% 3 Missing and 5 partials ⚠️
aws-lc-rs/src/ec/encoding.rs 65.00% 0 Missing and 7 partials ⚠️
aws-lc-rs/src/agreement.rs 66.66% 0 Missing and 4 partials ⚠️
aws-lc-rs/src/evp_pkey.rs 94.00% 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.96%   -2.84%     
==========================================
  Files          61       72      +11     
  Lines        8143     9906    +1763     
  Branches        0     9906    +9906     
==========================================
+ Hits         7801     9209    +1408     
- Misses        342      410      +68     
- Partials        0      287     +287     

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