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

Resolve mempool segfault #1061

Merged
merged 2 commits into from
Jan 25, 2022
Merged

Resolve mempool segfault #1061

merged 2 commits into from
Jan 25, 2022

Conversation

Bushstar
Copy link
Member

@Bushstar Bushstar commented Jan 25, 2022

PR to resolve mempool segfault when mempool.clear() is called. I believe that this is an issue upstream in Bitcoin but their usage of clear() does not result in any issues. We have additional uses including clearmempool which is used in the test, without this fix the test will result in a node crashing. The fix is to clear vTxHashes after mapTx is cleared, vTxHashes is a vector of all entries in mapTx so this seems reasonable, otherwise a TX iterator in vTxHashes might be used resulting in a segfault.

@prasannavl prasannavl added this to the 2.6.0 - Fort Canning Hill milestone Jan 25, 2022
@prasannavl prasannavl merged commit 2148a9b into master Jan 25, 2022
@prasannavl prasannavl deleted the fix-mempool-segfault branch January 25, 2022 10:47
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.

3 participants