CreateChainParams() returns a unique_ptr that ends up with no owner. This patch fixes that.
Details
Details
- Reviewers
deadalnix Fabien - Group Reviewers
Restricted Project - Commits
- rSTAGING31e8c49e22ca: Fix heap-use-after-free in activation_tests
rABC31e8c49e22ca: Fix heap-use-after-free in activation_tests
cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DENABLE_SANITIZERS=address -DCCACHE=OFF .. ninja test_bitcoin ./src/test/test_bitcoin --run_test=activation_tests
Before patch: Same failure as seen here: https://build.bitcoinabc.org/viewLog.html?buildId=24568&buildTypeId=BitcoinABC_Master_BitcoinAbcMasterAsan&tab=buildLog&_focus=1047
After patch: No errors detected
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Just hold onto the unique_ptr . The Params struct is huge and clearly not meant to be used by value.
src/test/activation_tests.cpp | ||
---|---|---|
28 ↗ | (On Diff #15064) | Note that this doesn't follow the convention that is used all over the codebase. |