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

Invalid pointers to underlying objects outlive DB #235

Closed
iSynaptic opened this issue Dec 7, 2018 · 5 comments
Closed

Invalid pointers to underlying objects outlive DB #235

iSynaptic opened this issue Dec 7, 2018 · 5 comments
Assignees
Labels

Comments

@iSynaptic
Copy link
Member

This is related to #234.

Pointers to underlying RocksDB objects (eg. iterators) can outlive the underlying DB object. If these objects are used after the DB is Drop-ped and closed, this can cause segfaults. Consider the implications to adding lifetime annotations to structs that manage these underlying objects.

@iSynaptic iSynaptic added the bug label Dec 7, 2018
@iSynaptic iSynaptic changed the title Invalid references outlive DB Invalid pointers to underlying objects outlive DB Dec 7, 2018
@aleksuss
Copy link
Member

aleksuss commented Dec 7, 2018

Very interesting. Could you please express an example of code that illustrates that bug ?

@iSynaptic iSynaptic self-assigned this Dec 7, 2018
@iSynaptic
Copy link
Member Author

@aleksuss Yes, I will (assigned this issue to myself). #234 has one example, but I suspect there are others. I'll try to find as many as I can.

@iSynaptic
Copy link
Member Author

iSynaptic commented Dec 7, 2018

Also, thanks to @rob-solana for finding this issue via #234.

@iSynaptic
Copy link
Member Author

I have a branch that fixes this issue. Should be a PR soon.

@iSynaptic
Copy link
Member Author

Fixed by #253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants