Commit 8c90a74
authored
Fix optImpliedByTypeOfAssertions to correctly find a non-null assertion (#120917)
Fixes #120792
This looks like some very old bug that was exposed by an unrelated
change in .NET 10.0
Basically, we have an assertion `obj->pMT == <cns_type>` we invoke
`optImpliedByTypeOfAssertions` to see if we can find some existing
assertion (anywhere) for `obj != null` so we can duplicate it into
current `ASSERT_TP& activeAssertions`, because `obj->pMT` assertion
implies obj is not null.
We do find such an assertion but for some reason we don't check that
it's null on the right side (op2) -> obj != null. Instead, we pick up
some random `obj != <frozen_object>` assertion which then is incorrectly
used.
[No
diffs.](https://dev.azure.com/dnceng-public/public/_build/results?buildId=1180340&view=ms.vss-build-web.run-extensions-tab)1 parent 8cb57ab commit 8c90a74
File tree
3 files changed
+51
-14
lines changed- src
- coreclr/jit
- tests/JIT/Regression/JitBlue/Runtime_120792
3 files changed
+51
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5776 | 5776 | | |
5777 | 5777 | | |
5778 | 5778 | | |
| 5779 | + | |
| 5780 | + | |
5779 | 5781 | | |
5780 | 5782 | | |
5781 | 5783 | | |
| |||
5804 | 5806 | | |
5805 | 5807 | | |
5806 | 5808 | | |
5807 | | - | |
| 5809 | + | |
5808 | 5810 | | |
5809 | 5811 | | |
5810 | 5812 | | |
5811 | 5813 | | |
5812 | 5814 | | |
5813 | | - | |
5814 | | - | |
5815 | | - | |
| 5815 | + | |
| 5816 | + | |
| 5817 | + | |
5816 | 5818 | | |
5817 | 5819 | | |
5818 | 5820 | | |
5819 | 5821 | | |
5820 | 5822 | | |
5821 | | - | |
| 5823 | + | |
5822 | 5824 | | |
5823 | | - | |
5824 | | - | |
5825 | | - | |
5826 | | - | |
5827 | | - | |
5828 | | - | |
5829 | | - | |
5830 | | - | |
5831 | | - | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
5832 | 5828 | | |
5833 | 5829 | | |
5834 | 5830 | | |
| |||
Lines changed: 28 additions & 0 deletions
| 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 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments