Commit 2a36ef5
authored
[DebugInfo] Allow DISubrange/DIGenericSubrange without count/upperBound. (#96474)
Due to the current order of metadata in DISubprgram, `Type` is processed
before `Unit` by the Verifier. This can cause a race and
use of garbage data. Consider the following code:
```
int test(int a[][5])
{
return a[0][2];
}
```
when compiled with clang, the control reaches
`Verifier::visitDISubrange` first with `CurrentSourceLang` still equal
to dwarf::DW_LANG_lo_user (32768). The `Verifier::visitDICompileUnit`
which sets the value of `CurrentSourceLang` is reached later. So
`Verifier::visitDISubrange` ends up using a wrong value of
`CurrentSourceLang`.
This behavior does not effect C like language much but is a problem for
Fortran. There is special processing in `Verifier::visitDISubrange` when
`CurrentSourceLang` is Fortran. With this problem, that special handling
is missed and verifier fails for any code that has Fortran's assumed
size array in a global subroutine.
Various solutions were tried to solve this problem before it was decided that
best course of action is to remove these checks from Verifier.1 parent 313b6c9 commit 2a36ef5
File tree
5 files changed
+40
-26
lines changed- llvm
- lib/IR
- test
- Assembler
- DebugInfo
- Verifier
5 files changed
+40
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | 362 | | |
366 | 363 | | |
367 | 364 | | |
| |||
1156 | 1153 | | |
1157 | 1154 | | |
1158 | 1155 | | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | 1156 | | |
1164 | 1157 | | |
1165 | 1158 | | |
| |||
1188 | 1181 | | |
1189 | 1182 | | |
1190 | 1183 | | |
1191 | | - | |
1192 | | - | |
1193 | 1184 | | |
1194 | 1185 | | |
1195 | 1186 | | |
| |||
1413 | 1404 | | |
1414 | 1405 | | |
1415 | 1406 | | |
1416 | | - | |
1417 | | - | |
1418 | 1407 | | |
1419 | 1408 | | |
1420 | 1409 | | |
| |||
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
Lines changed: 0 additions & 5 deletions
This file was deleted.
This file was deleted.
0 commit comments