[all-commits] [llvm/llvm-project] abd980: [ELF] mergeCmp: work around irreflexivity bug
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Aug 5 17:08:50 PDT 2022
Author: Fangrui Song <i at maskray.me>
Date: 2022-08-05 (Fri, 05 Aug 2022)
[ELF] mergeCmp: work around irreflexivity bug
Some tests (e.g. aarch64-feature-pac.s) segfault in libstdc++ _GLIBCXX_DEBUG
builds (enabled by LLVM_ENABLE_EXPENSIVE_CHECKS).
dyn_cast<ThunkSection> is incorrectly true for any SyntheticSection. std::merge
transitively calls mergeCmp(x, x) (due to __glibcxx_requires_irreflexive_pred)
and will segfault in `ta->getTargetInputSection()`. The dyn_cast<ThunkSection>
issue should be eventually fixed properly, bug `a != b` is robust enough for now.
More information about the All-commits