Rust-rocksdb: Invalid pointers to underlying objects outlive DB

Created on 7 Dec 2018  路  5Comments  路  Source: rust-rocksdb/rust-rocksdb

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.

bug

All 5 comments

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

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

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

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

Fixed by #253

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iSynaptic picture iSynaptic  路  12Comments

rohitjoshi picture rohitjoshi  路  10Comments

yiyanwannian picture yiyanwannian  路  6Comments

zach-schoenberger picture zach-schoenberger  路  5Comments

rrichardson picture rrichardson  路  7Comments