HomePhabricator

Fix undefined behavior in rcu_tests

Description

Fix undefined behavior in rcu_tests

Summary:
This diff removes a call in rcu_tests which triggers the null pointer
dereference check from UBSAN. gptr internal pointer is initialized to
nullptr and called with the * operator.
This does not impact the test coverage as the operator is tested later
in the test case.

Test Plan:

../configure --enable-debug --with-sanitizers=undefined
make
./src/test/test_bitcoin -t rcu_tests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D3739

Details

Provenance
FabienAuthored on Jul 25 2019, 14:32
FabienPushed on Jul 25 2019, 19:42
Reviewer
Restricted Project
Differential Revision
D3739: Fix undefined behavior in rcu_tests
Parents
rSTAGING4176671b72e6: Add phpcs to the code formatting tools in the CONTRIBUTING document
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/10489