Page MenuHomePhabricator

Fix undefined behavior in rcu_tests
ClosedPublic

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

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
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.