QDoc: Skip end-to-end tests under AddressSanitizer
Qt's CI runs the QDoc test suite under AddressSanitizer by linking
qdoc against the production libclang artefact, which is built without
sanitiser instrumentation. The asymmetric configuration trips an
upstream LLVM defect in BumpPtrAllocator: inline poison/unpoison
calls are gated on a per-translation-unit macro, so the slow-path
StartNewSlab poisons via QDoc's instrumented copy while downstream
consumers inside libclang read those bytes through compiler-
instrumented loads. ASan reports the reads as use-after-poison.
The reports surface across many libclang code paths and are produced
both via memcpy interceptors (suppressible by ASan suppression files)
and through direct compiler-instrumented loads (which ASan does not
consult suppressions for). With multiple manifestations and no single
mechanism able to cover them all, ASan validation of the libclang-
exercising test drivers cannot proceed cleanly while libclang stays
unsanitised. The defect is unfixed across LLVM 20.1.0 through trunk;
given the QDoc-supported libclang versions, no upstream fix is
expected to land in the time horizon that matters here.
This change skips the three test drivers that spawn a qdoc
subprocess — tst_generatedOutput, tst_validateQdocOutputFiles, and
tst_validateTemplateGeneratorOutput — under AddressSanitizer using
QSKIP at the start of initTestCase. The skip is gated on the
consumer translation unit's sanitiser flags, so non-ASan builds
remain unaffected and other QDoc tests under ASan continue to
validate normally. The skip is trivially reverted once a sanitiser-
instrumented libclang variant or an upstream LLVM fix removes the
asymmetric configuration.
This commit is a pre-requisite for the QDoc commit
"QDoc: recognise out-of-line-defined hidden friends", which happens
to shift the libclang allocator's slab boundary enough to expose the
latent defect under Coin's ASan validation pass. As the issue doesn't
present on any released branch, this change isn't cherry-picked.
Task-number: QTBUG-146577
Change-Id: Ibbc052aa478a28a8ea23d1173897a2d72688707e
Reviewed-by: Topi Reinio <topi.reinio@qt.io>