Commit 38489b9
authored
[clr-interp] Fix EH logic edge case (#122993)
When a try block exactly encloses another try/finally or try/catch block
and the handler ends at the same point the try body ends we had an off
by one issue in our reprentation of the ilOffset on the leave chain
islands. This fixes the off by one issue for that kind of basic block.
The C# compiler seems to always inject a nop to avoid this issue, but I
do not know why and I can find no justification for that rule.
Fixes badcodeinsidefinally tests1 parent 768a134 commit 38489b9
2 files changed
+27
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
1100 | 1106 | | |
1101 | 1107 | | |
| 1108 | + | |
1102 | 1109 | | |
1103 | 1110 | | |
1104 | 1111 | | |
1105 | 1112 | | |
1106 | 1113 | | |
| 1114 | + | |
1107 | 1115 | | |
1108 | 1116 | | |
1109 | 1117 | | |
| |||
1569 | 1577 | | |
1570 | 1578 | | |
1571 | 1579 | | |
| 1580 | + | |
1572 | 1581 | | |
1573 | 1582 | | |
1574 | 1583 | | |
| |||
1682 | 1691 | | |
1683 | 1692 | | |
1684 | 1693 | | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
1685 | 1706 | | |
1686 | 1707 | | |
1687 | 1708 | | |
| |||
2272 | 2293 | | |
2273 | 2294 | | |
2274 | 2295 | | |
2275 | | - | |
| 2296 | + | |
2276 | 2297 | | |
| 2298 | + | |
2277 | 2299 | | |
2278 | 2300 | | |
2279 | 2301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
338 | 341 | | |
339 | 342 | | |
340 | 343 | | |
| |||
366 | 369 | | |
367 | 370 | | |
368 | 371 | | |
| 372 | + | |
369 | 373 | | |
370 | 374 | | |
371 | 375 | | |
| |||
0 commit comments