Skip to content

leveldb: Don't crash when using a released snapshot#320

Merged
syndtr merged 1 commit intosyndtr:masterfrom
calmh:nilpanic
Aug 15, 2020
Merged

leveldb: Don't crash when using a released snapshot#320
syndtr merged 1 commit intosyndtr:masterfrom
calmh:nilpanic

Conversation

@calmh
Copy link
Copy Markdown
Contributor

@calmh calmh commented May 16, 2020

The snapshot has a mutex and a released bool, but the access methods
touch db before looking at released. The db is set to nil when the
snap is released. Hence ErrSnapshotReleased is never returned, instead
the program panics with a nil deref.

The snapshot has a mutex and a `released` bool, but the access methods
touch `db` before looking at `released`. The `db` is set to nil when the
snap is released. Hence ErrSnapshotReleased is never returned, instead
the program panics with a nil deref.
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