HomePhabricator

[CMAKE] Prevent using jemalloc with the sanitizers

Description

[CMAKE] Prevent using jemalloc with the sanitizers

Summary:
The sanitizers require instrumentation of the allocation functions and
are generally not compatible with jemalloc. In a worst case scenario
this could lead to false negative. This diffs disables jemalloc when a
sanitizer is enabled and prints a warning.

Test Plan:
Should print a warning:

cmake -GNinja .. \
  -DENABLE_SANITIZERS=address \
  -DUSE_JEMALLOC_EXPERIMENTAL=ON

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
FabienAuthored on Jun 4 2020, 12:17
FabienPushed on Jun 4 2020, 13:45
Reviewer
Restricted Project
Differential Revision
D6365: [CMAKE] Prevent using jemalloc with the sanitizers
Parents
rABC81b7dd6bc389: Suppress a harmless variable-time optimization by clang in memczero
Branches
Unknown
Tags
Unknown