Commit 4bce214
authored
Ensure !NDEBUG with LLVM_ENABLE_ABI_BREAKING_CHECKS does not segfault (llvm#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.1 parent 87b3c07 commit 4bce214
File tree
4 files changed
+12
-12
lines changed- llvm
- include/llvm/CodeGen
- lib/CodeGen/SelectionDAG
4 files changed
+12
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11744 | 11744 | | |
11745 | 11745 | | |
11746 | 11746 | | |
11747 | | - | |
| 11747 | + | |
11748 | 11748 | | |
11749 | 11749 | | |
11750 | 11750 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
| 943 | + | |
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
| |||
960 | 960 | | |
961 | 961 | | |
962 | 962 | | |
963 | | - | |
| 963 | + | |
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| |||
982 | 982 | | |
983 | 983 | | |
984 | 984 | | |
985 | | - | |
| 985 | + | |
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| |||
1006 | 1006 | | |
1007 | 1007 | | |
1008 | 1008 | | |
1009 | | - | |
| 1009 | + | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | 1012 | | |
| |||
1024 | 1024 | | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | | - | |
| 1027 | + | |
1028 | 1028 | | |
1029 | 1029 | | |
1030 | 1030 | | |
| |||
1040 | 1040 | | |
1041 | 1041 | | |
1042 | 1042 | | |
1043 | | - | |
| 1043 | + | |
1044 | 1044 | | |
1045 | 1045 | | |
1046 | 1046 | | |
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | | - | |
| 1063 | + | |
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| |||
1080 | 1080 | | |
1081 | 1081 | | |
1082 | 1082 | | |
1083 | | - | |
| 1083 | + | |
1084 | 1084 | | |
1085 | 1085 | | |
1086 | 1086 | | |
| |||
1100 | 1100 | | |
1101 | 1101 | | |
1102 | 1102 | | |
1103 | | - | |
| 1103 | + | |
1104 | 1104 | | |
1105 | 1105 | | |
1106 | 1106 | | |
| |||
0 commit comments