Commit f60800e
Fix bug introduced by preventing unwind through stack bottom (#81956)
The irecent fix to prevent unwinding through stack bottom was
incorrect for secondary threads, as it just compared the SP
being above the frame of the hosting API. However, other threads
can have their stacks anywhere in the memory, thus this
sometimes broke exception handling on secondary threads.
I have also found that there was one more case where the
unwind through the hosting API need to be checked - the
Thread::VirtualUnwindToFirstManagedCallFrame.
I have decided to use the return address of the hosting
API for the checks instead of the frame address. That
makes the check work properly.1 parent 218df16 commit f60800e
File tree
3 files changed
+15
-10
lines changed- src/coreclr
- dlls/mscoree
- vm
3 files changed
+15
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
| 216 | + | |
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| |||
232 | 233 | | |
233 | 234 | | |
234 | 235 | | |
235 | | - | |
| 236 | + | |
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
| |||
443 | 444 | | |
444 | 445 | | |
445 | 446 | | |
| 447 | + | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| |||
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
462 | | - | |
| 464 | + | |
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4523 | 4523 | | |
4524 | 4524 | | |
4525 | 4525 | | |
4526 | | - | |
| 4526 | + | |
4527 | 4527 | | |
4528 | 4528 | | |
4529 | 4529 | | |
| |||
4727 | 4727 | | |
4728 | 4728 | | |
4729 | 4729 | | |
4730 | | - | |
| 4730 | + | |
4731 | 4731 | | |
4732 | 4732 | | |
4733 | 4733 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| 712 | + | |
| 713 | + | |
712 | 714 | | |
713 | 715 | | |
714 | 716 | | |
| |||
751 | 753 | | |
752 | 754 | | |
753 | 755 | | |
754 | | - | |
| 756 | + | |
755 | 757 | | |
| 758 | + | |
756 | 759 | | |
757 | 760 | | |
758 | 761 | | |
| |||
0 commit comments