diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-04-12 20:22:38 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-04-15 11:46:24 -0400 |
commit | fa176e253fb473767c61d4d8cd2d93e87d71a015 (patch) | |
tree | e204ffd3fb7942d276afdd1f915180cc395498de /src/test/txindex_tests.cpp | |
parent | a2b282c9d05843e5729e1a597ab764d912a6343e (diff) | |
download | bitcoin-fa176e253fb473767c61d4d8cd2d93e87d71a015.tar.xz |
test: Avoid accessing free'd memory in validation_chainstatemanager_tests
Diffstat (limited to 'src/test/txindex_tests.cpp')
-rw-r--r-- | src/test/txindex_tests.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/test/txindex_tests.cpp b/src/test/txindex_tests.cpp index 3550a02316..721e3498e6 100644 --- a/src/test/txindex_tests.cpp +++ b/src/test/txindex_tests.cpp @@ -70,12 +70,8 @@ BOOST_FIXTURE_TEST_CASE(txindex_initial_sync, TestChain100Setup) // shutdown sequence (c.f. Shutdown() in init.cpp) txindex.Stop(); - // txindex job may be scheduled, so stop scheduler before destructing - m_node.scheduler->stop(); - threadGroup.interrupt_all(); - threadGroup.join_all(); - - // Rest of shutdown sequence and destructors happen in ~TestingSetup() + // Let scheduler events finish running to avoid accessing any memory related to txindex after it is destructed + SyncWithValidationInterfaceQueue(); } BOOST_AUTO_TEST_SUITE_END() |