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

Hold scipptr in variable to eliminate use-after-free errors #160

Merged
merged 7 commits into from
Oct 24, 2024

Conversation

mmghannam
Copy link
Member

This is the last part of #152

@mmghannam
Copy link
Member Author

mmghannam commented Oct 22, 2024

@Andful would be great if you could take another look here, thanks again for your help!

Copy link

@Andful Andful left a comment

Choose a reason for hiding this comment

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

Looks good. I personally would be stricter with unsafety. I would mark a function unsafe if there exists arguments that would cause UB, even if they are edge cases, e.g. NULL or dangling pointers.

@Andful
Copy link

Andful commented Oct 22, 2024

See #159 (comment)

@mmghannam
Copy link
Member Author

@Andful thanks a lot for the quick and helpful review! you caught a lot of potential issues.

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

Attention: Patch coverage is 81.00000% with 19 lines in your changes missing coverage. Please review.

Project coverage is 76.12%. Comparing base (a7b9ef3) to head (b642e74).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/scip.rs 84.21% 9 Missing ⚠️
src/model.rs 58.82% 7 Missing ⚠️
src/variable.rs 75.00% 2 Missing ⚠️
src/branchrule.rs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #160      +/-   ##
==========================================
- Coverage   76.23%   76.12%   -0.12%     
==========================================
  Files          13       13              
  Lines        1805     1859      +54     
==========================================
+ Hits         1376     1415      +39     
- Misses        429      444      +15     

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

@mmghannam mmghannam merged commit 6bede58 into main Oct 24, 2024
4 of 5 checks passed
@mmghannam mmghannam deleted the safe-scipref-vars branch October 24, 2024 06:22
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