fix: Add LedgerReplay deadlock suppression and fix GCC ASAN linker error

- Suppress lock-order-inversion in LedgerReplayTask/LedgerDeltaAcquire
  (28 TSAN warnings from pre-existing lock ordering issue).
- Add tools.build:cflags to Conan sanitizer profiles so that C
  dependencies (ed25519) are compiled with -mcmodel=large and sanitizer
  flags, fixing the GOTPCREL relocation overflow on GCC ASAN builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Pratik Mankawde
2026-03-19 14:00:42 +00:00
parent 2117959900
commit 7d975cae2f
2 changed files with 10 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ include(default)
{% set sanitizer_flags = "-fsanitize=" ~ ",".join(sanitizer_list) ~ " " ~ model_code %}
tools.build:cxxflags+=['{{sanitizer_flags}} {{" ".join(extra_cxxflags)}}']
tools.build:cflags+=['{{sanitizer_flags}} -fno-omit-frame-pointer -O1']
tools.build:sharedlinkflags+=['{{sanitizer_flags}}']
tools.build:exelinkflags+=['{{sanitizer_flags}}']
tools.build:defines+={{defines}}
@@ -61,6 +62,7 @@ include(default)
{% set sanitizer_flags = "-fsanitize=" ~ ",".join(sanitizer_list) %}
tools.build:cxxflags+=['{{sanitizer_flags}} {{" ".join(extra_cxxflags)}}']
tools.build:cflags+=['{{sanitizer_flags}} -fno-omit-frame-pointer -O1']
tools.build:sharedlinkflags+=['{{sanitizer_flags}}']
tools.build:exelinkflags+=['{{sanitizer_flags}}']
tools.build:defines+={{defines}}
@@ -68,7 +70,7 @@ include(default)
{% endif %}
{% endif %}
tools.info.package_id:confs+=["tools.build:cxxflags", "tools.build:exelinkflags", "tools.build:sharedlinkflags", "tools.build:defines"]
tools.info.package_id:confs+=["tools.build:cxxflags", "tools.build:cflags", "tools.build:exelinkflags", "tools.build:sharedlinkflags", "tools.build:defines"]
[options]
{% if sanitizers %}

View File

@@ -42,6 +42,13 @@ deadlock:boost::asio
# Requires a larger lock-ordering redesign to fix properly.
deadlock:RCLConsensus
# Lock-order-inversion in LedgerReplay subsystem.
# LedgerDeltaAcquire::notify() calls LedgerReplayTask::deltaReady() while
# holding LedgerDeltaAcquire's mutex, which then acquires LedgerReplayTask's
# mutex. The reverse order also occurs. Pre-existing design issue.
deadlock:LedgerReplayTask
deadlock:LedgerDeltaAcquire
# Signal/crash suppressions for GCC TSAN instrumentation issues
signal:std::__cxx11::basic_stringbuf
signal:basic_stringbuf