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

[runtime] Bad Deref in DemiBuffer::drop() Causes Segmentation Fault #312

Merged
merged 2 commits into from
Oct 26, 2022

Conversation

BrianZill
Copy link
Contributor

This PR fixes Issue#310.

The drop code was referencing DemiBuffer's ptr field directly, rather than calling the internal get_ptr() method to get the MetaData pointer.

One take-away from this experience, is that we can't trust individual unit tests to (indirectly) test drop methods. The DemiBuffer unit tests ran fine when run individually, or even together. It appears to be non-deterministic as to whether Cargo's test harness keeps the test environment around long enough for destructors to run.

@BrianZill BrianZill changed the title [runtime] BugFix: Bad deref in DemiBuffer::drop() causes segmentation fault [runtime] BugFix: Bad Deref in DemiBuffer::drop() Causes Segmentation Fault Oct 25, 2022
@ppenna ppenna changed the title [runtime] BugFix: Bad Deref in DemiBuffer::drop() Causes Segmentation Fault [runtime] Bad Deref in DemiBuffer::drop() Causes Segmentation Fault Oct 25, 2022
@ppenna ppenna added the bug Something Isn't Working label Oct 25, 2022
Copy link
Contributor

@ppenna ppenna 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.

Please, consider rebasing your branch and waiting for the regressions to succeed, before proceeding with the merge.

@BrianZill BrianZill merged commit 51cbecd into dev Oct 26, 2022
@BrianZill BrianZill deleted the bugfix-demibuffer branch October 26, 2022 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something Isn't Working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants