[all-commits] [llvm/llvm-project] 4bce21: Ensure !NDEBUG with LLVM_ENABLE_ABI_BREAKING_CHECK...
Dimitry Andric via All-commits
all-commits at lists.llvm.org
Thu Oct 24 10:30:59 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4bce21480fc52bf583b6bfe5072f9eb70c21f6e4
https://github.com/llvm/llvm-project/commit/4bce21480fc52bf583b6bfe5072f9eb70c21f6e4
Author: Dimitry Andric <dimitry at andric.com>
Date: 2024-10-24 (Thu, 24 Oct 2024)
Changed paths:
M llvm/include/llvm/CodeGen/SelectionDAG.h
M llvm/include/llvm/CodeGen/SelectionDAGISel.h
M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Log Message:
-----------
Ensure !NDEBUG with LLVM_ENABLE_ABI_BREAKING_CHECKS does not segfault (#113588)
In SelectionDAG, `TargetTransformInfo::hasBranchDivergence()` can be
called when both `NDEBUG` and `LLVM_ENABLE_ABI_BREAKING_CHECKS` are
enabled. In that case, the class member `TTI` is still initialized to
`nullptr`, causing a segfault.
Fix this by ensuring that all the calls to `hasBranchDivergence` and
`VerifyDAGDivergence` only occur when `NDEBUG` is disabled, and
`LLVM_ENABLE_ABI_BREAKING_CHECKS` is enabled.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list