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
- Branch
- fix-use-after-free
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 8678 Build 15342: Default Diff Build & Tests Build 15341: arc lint + arc unit
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 | Note that this doesn't follow the convention that is used all over the codebase. |