Commit 390d172
Fix unhandled exception in tiered compilation thread (#116716)
* Fix unhandled exception in tiered compilation thread
The detection the unhandled exception is not working in the case of
the tiered compilation thread, because there is no indication that
the exception is going to be caught in the `CEEInfo::runWithErrorTrap`.
So the EH assumes the exception is going to be unhandled and
exits the process.
The unhandled exception message was not seen in the repro case
of the issue likely because the tiered compilation thread console
output didn't get flushed. When running under a debugger and stepping
over the `InternalUnhandledExceptionFilter_Worker`, it was actually
printed out.
The fix is to add `DebuggerU2MCatchHandlerFrame` to the
`CEEInfo::runWithErrorTrap`. That allows the EH to see that the
exception will be caught there and let it flow through the
CallDescrWorker to reach that trap.
Closes #116676
* Add regression test and fix GC mode
* Make the regression test actually work
It needs to be compiled as optimized and the Console.WriteLine is needed to repro
the issue.
* Modify the regression test to not to print to console
* PR feedback
* Update src/coreclr/vm/jitinterface.cpp
Fix contract
Co-authored-by: Jan Kotas <[email protected]>
---------
Co-authored-by: Jan Kotas <[email protected]>1 parent 830a786 commit 390d172
File tree
5 files changed
+65
-144
lines changed- src
- coreclr/vm
- tests/Regressions/coreclr/GitHub_116676
5 files changed
+65
-144
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2169 | 2169 | | |
2170 | 2170 | | |
2171 | 2171 | | |
| 2172 | + | |
2172 | 2173 | | |
2173 | 2174 | | |
2174 | 2175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3910 | 3910 | | |
3911 | 3911 | | |
3912 | 3912 | | |
3913 | | - | |
| 3913 | + | |
3914 | 3914 | | |
3915 | 3915 | | |
3916 | 3916 | | |
| |||
3958 | 3958 | | |
3959 | 3959 | | |
3960 | 3960 | | |
3961 | | - | |
| 3961 | + | |
3962 | 3962 | | |
3963 | 3963 | | |
3964 | 3964 | | |
3965 | | - | |
| 3965 | + | |
3966 | 3966 | | |
3967 | 3967 | | |
3968 | 3968 | | |
3969 | | - | |
3970 | | - | |
| 3969 | + | |
| 3970 | + | |
3971 | 3971 | | |
3972 | | - | |
| 3972 | + | |
3973 | 3973 | | |
3974 | 3974 | | |
3975 | 3975 | | |
| |||
3994 | 3994 | | |
3995 | 3995 | | |
3996 | 3996 | | |
3997 | | - | |
| 3997 | + | |
3998 | 3998 | | |
3999 | 3999 | | |
4000 | 4000 | | |
4001 | 4001 | | |
4002 | | - | |
| 4002 | + | |
4003 | 4003 | | |
4004 | 4004 | | |
4005 | 4005 | | |
4006 | 4006 | | |
4007 | 4007 | | |
4008 | 4008 | | |
4009 | 4009 | | |
4010 | | - | |
| 4010 | + | |
4011 | 4011 | | |
4012 | 4012 | | |
4013 | 4013 | | |
| |||
4167 | 4167 | | |
4168 | 4168 | | |
4169 | 4169 | | |
4170 | | - | |
| 4170 | + | |
4171 | 4171 | | |
4172 | 4172 | | |
4173 | 4173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10288 | 10288 | | |
10289 | 10289 | | |
10290 | 10290 | | |
10291 | | - | |
10292 | | - | |
10293 | | - | |
10294 | | - | |
10295 | | - | |
10296 | | - | |
10297 | | - | |
10298 | | - | |
10299 | | - | |
10300 | | - | |
10301 | | - | |
10302 | | - | |
10303 | | - | |
10304 | | - | |
10305 | | - | |
10306 | | - | |
10307 | | - | |
10308 | | - | |
10309 | | - | |
10310 | | - | |
10311 | | - | |
10312 | | - | |
10313 | | - | |
10314 | | - | |
10315 | | - | |
10316 | | - | |
10317 | | - | |
10318 | | - | |
10319 | | - | |
10320 | | - | |
10321 | | - | |
10322 | | - | |
10323 | | - | |
10324 | | - | |
10325 | | - | |
10326 | | - | |
10327 | | - | |
10328 | | - | |
10329 | | - | |
10330 | | - | |
10331 | | - | |
10332 | | - | |
10333 | | - | |
10334 | | - | |
10335 | | - | |
10336 | | - | |
10337 | | - | |
10338 | | - | |
10339 | | - | |
10340 | | - | |
10341 | | - | |
10342 | | - | |
10343 | | - | |
10344 | | - | |
10345 | | - | |
10346 | | - | |
10347 | | - | |
10348 | | - | |
10349 | | - | |
10350 | | - | |
10351 | | - | |
10352 | | - | |
10353 | | - | |
10354 | | - | |
10355 | | - | |
10356 | | - | |
10357 | | - | |
10358 | | - | |
10359 | | - | |
10360 | | - | |
10361 | | - | |
10362 | | - | |
10363 | | - | |
10364 | | - | |
10365 | | - | |
10366 | | - | |
10367 | | - | |
10368 | | - | |
10369 | | - | |
10370 | | - | |
10371 | | - | |
10372 | | - | |
10373 | | - | |
10374 | | - | |
10375 | 10291 | | |
10376 | 10292 | | |
10377 | 10293 | | |
| |||
10550 | 10466 | | |
10551 | 10467 | | |
10552 | 10468 | | |
10553 | | - | |
10554 | | - | |
10555 | | - | |
10556 | | - | |
10557 | | - | |
10558 | | - | |
10559 | | - | |
10560 | | - | |
10561 | | - | |
10562 | | - | |
10563 | | - | |
10564 | | - | |
10565 | | - | |
10566 | | - | |
10567 | | - | |
10568 | | - | |
10569 | | - | |
10570 | | - | |
10571 | | - | |
10572 | | - | |
10573 | 10469 | | |
10574 | 10470 | | |
10575 | 10471 | | |
| |||
10590 | 10486 | | |
10591 | 10487 | | |
10592 | 10488 | | |
10593 | | - | |
10594 | | - | |
10595 | | - | |
10596 | | - | |
| 10489 | + | |
| 10490 | + | |
| 10491 | + | |
| 10492 | + | |
| 10493 | + | |
| 10494 | + | |
10597 | 10495 | | |
10598 | 10496 | | |
10599 | | - | |
10600 | | - | |
10601 | | - | |
| 10497 | + | |
| 10498 | + | |
10602 | 10499 | | |
10603 | 10500 | | |
10604 | 10501 | | |
10605 | | - | |
10606 | | - | |
10607 | | - | |
10608 | | - | |
10609 | | - | |
10610 | | - | |
10611 | | - | |
10612 | | - | |
10613 | | - | |
10614 | | - | |
10615 | | - | |
10616 | | - | |
10617 | | - | |
10618 | | - | |
10619 | | - | |
10620 | | - | |
10621 | | - | |
10622 | | - | |
10623 | | - | |
| 10502 | + | |
| 10503 | + | |
10624 | 10504 | | |
10625 | | - | |
10626 | | - | |
10627 | | - | |
10628 | 10505 | | |
10629 | 10506 | | |
| 10507 | + | |
10630 | 10508 | | |
10631 | 10509 | | |
10632 | 10510 | | |
| |||
10636 | 10514 | | |
10637 | 10515 | | |
10638 | 10516 | | |
10639 | | - | |
| 10517 | + | |
10640 | 10518 | | |
10641 | 10519 | | |
10642 | 10520 | | |
| |||
Lines changed: 30 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 | + | |
| 29 | + | |
| 30 | + | |
Lines changed: 12 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 | + | |
0 commit comments