Page MenuHomePhabricator

Fix undefined behavior in rcu_tests

Authored by Fabien on Jul 25 2019, 14:49.



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
./src/test/test_bitcoin -t rcu_tests

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Jul 25 2019, 14:49
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 25 2019, 14:49
deadalnix accepted this revision.Jul 25 2019, 17:15
This revision is now accepted and ready to land.Jul 25 2019, 17:15
This revision was automatically updated to reflect the committed changes.