HomePhabricator

Implements a virtual destructor on the BaseRequestHandler class.

Description

Implements a virtual destructor on the BaseRequestHandler class.

Summary:

Implements a virtual destructor on the BaseRequestHandler class to
protect against undefined behavior in the event that a derived
BaseRequestHandler class has a destructor and an object of such derived
class is destroyed through a pointer to its base class.

Backport of core PR12050
https://github.com/bitcoin/bitcoin/pull/12050/files

Note: the event described above actually occurs.

Test Plan:
Build with Clang and check there is no -Wdelete-non-virtual-dtor
warning.

With ASAN enabled:

./test/functional/test_runner.py interface_bitcoin_cli

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
251 <13120787+251Labs@users.noreply.github.com>Authored on Dec 29 2017, 15:20
FabienCommitted on Jul 9 2019, 13:51
FabienPushed on Jul 9 2019, 13:51
Reviewer
Restricted Project
Differential Revision
D3605: Implements a virtual destructor on the BaseRequestHandler class.
Parents
rABC9ad90486546a: Add the sanitizers suppression files and use them in teamcity build
Branches
Unknown
Tags
Unknown