Page MenuHomePhabricator

[CMAKE] Prevent using jemalloc with the sanitizers
ClosedPublic

Authored by Fabien on Jun 4 2020, 12:43.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC62d103aa2e8f: [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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Jun 4 2020, 12:43
Fabien planned changes to this revision.Jun 4 2020, 12:47
Fabien retitled this revision from [CMAKE] Prevent using the sanitizers with jemalloc to [CMAKE] Prevent using jemalloc with the sanitizers .Jun 4 2020, 12:51
Fabien edited the summary of this revision. (Show Details)
Fabien edited the test plan for this revision. (Show Details)
Fabien retitled this revision from [CMAKE] Prevent using jemalloc with the sanitizers to [CMAKE] Prevent using jemalloc with the sanitizers.

Print a warning and disable jemalloc rather that requiring the user to enter 2 options

This revision is now accepted and ready to land.Jun 4 2020, 13:31