Commit 044805c
authored
Enhance createdump to detect alt stack execution (#127068)
createdump's UnwindNativeFrames fails to capture the original thread
stack when a crash occurs on a thread using an alternate signal stack.
The native unwinder's monotonic-SP guard breaks we cross crosses the
signal trampoline back to the original stack, because the SP
legitimately decreases. This causes the unwinder to stop early, omitting
the original stack memory from the dump.
Use `unw_is_signal_frame` in `PAL_VirtualUnwindOutOfProc` to detect
signal trampoline frames. When a signal frame is detected,
`UnwindNativeFrames` allows a single SP decrease, enabling the unwinder
to cross back to the original stack and capture its memory.1 parent 4f0a034 commit 044805c
4 files changed
Lines changed: 36 additions & 8 deletions
File tree
- src/coreclr
- debug/createdump
- pal
- inc
- src/exception
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
132 | | - | |
| 133 | + | |
| 134 | + | |
133 | 135 | | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
137 | 139 | | |
138 | | - | |
| 140 | + | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
76 | 87 | | |
77 | 88 | | |
78 | 89 | | |
| |||
104 | 115 | | |
105 | 116 | | |
106 | 117 | | |
107 | | - | |
| 118 | + | |
| 119 | + | |
108 | 120 | | |
109 | 121 | | |
110 | 122 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2335 | 2335 | | |
2336 | 2336 | | |
2337 | 2337 | | |
2338 | | - | |
| 2338 | + | |
2339 | 2339 | | |
2340 | 2340 | | |
2341 | 2341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2328 | 2328 | | |
2329 | 2329 | | |
2330 | 2330 | | |
| 2331 | + | |
2331 | 2332 | | |
2332 | 2333 | | |
2333 | 2334 | | |
2334 | | - | |
| 2335 | + | |
2335 | 2336 | | |
2336 | 2337 | | |
2337 | 2338 | | |
2338 | 2339 | | |
2339 | 2340 | | |
2340 | 2341 | | |
2341 | 2342 | | |
| 2343 | + | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
2342 | 2348 | | |
2343 | 2349 | | |
2344 | 2350 | | |
| |||
2410 | 2416 | | |
2411 | 2417 | | |
2412 | 2418 | | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
2413 | 2427 | | |
2414 | 2428 | | |
2415 | 2429 | | |
| |||
2572 | 2586 | | |
2573 | 2587 | | |
2574 | 2588 | | |
2575 | | - | |
| 2589 | + | |
2576 | 2590 | | |
2577 | 2591 | | |
2578 | 2592 | | |
| |||
0 commit comments