Commit 7fa306e
Runtime-async Exception.ToString() (#122722)
This PR implements exception stack trace collection in runtime-async
stacks for both coreclr and nativeAOT.
* Augmenting stack unwinding logic in AsyncHelpers.CoreCLR.cs to append
frames from runtime-async async-await chain to exception stacktrace
using DiagnosticIP of Continuation.
* Implements ThrowExact helper to throw exception that has been stored
in Continuation, while keeping its existing stack trace intact.
Accomplished by creating throw helpers that set ExKind.RethrowFlag.
Would be open to rename "RethrowFlag" and companions to "NoEraseFlag" or
something similar, or leave as is.
* ILC changes: Ensuring that stack trace records are emitted for
runtime-async methods, and hidden for resumption stubs.
* Testing: Added tests for line/method/document correctness including
v1-v2 chaining.
@dotnet/ilc-contrib
---------
Co-authored-by: Jakob Botsch Nielsen <[email protected]>
Co-authored-by: Adeel <[email protected]>
Co-authored-by: Jan Kotas <[email protected]>1 parent 0402dfa commit 7fa306e
File tree
41 files changed
+734
-133
lines changed- docs/design/coreclr/botr
- src
- coreclr
- System.Private.CoreLib/src/System/Runtime/CompilerServices
- inc
- nativeaot
- Runtime
- amd64
- arm64
- arm
- i386
- inc
- loongarch64
- riscv64
- System.Private.CoreLib/src/System
- tools
- Common/Internal/Runtime
- aot
- ILCompiler.Compiler/Compiler
- ILCompiler.ReadyToRun/JitInterface
- ILCompiler.Reflection.ReadyToRun
- ILCompiler.RyuJit/JitInterface
- vm
- libraries
- Common/tests
- System/Runtime/CompilerServices
- TestUtilities/System
- System.Diagnostics.StackTrace/tests
- System.Private.CoreLib/src/System/Runtime/CompilerServices
- tests/async
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
41 files changed
+734
-133
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
858 | 858 | | |
859 | 859 | | |
860 | 860 | | |
| 861 | + | |
861 | 862 | | |
862 | 863 | | |
863 | 864 | | |
| |||
Lines changed: 22 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
232 | 240 | | |
233 | 241 | | |
234 | 242 | | |
| |||
436 | 444 | | |
437 | 445 | | |
438 | 446 | | |
| 447 | + | |
439 | 448 | | |
440 | 449 | | |
441 | 450 | | |
| |||
469 | 478 | | |
470 | 479 | | |
471 | 480 | | |
472 | | - | |
| 481 | + | |
473 | 482 | | |
474 | 483 | | |
475 | 484 | | |
| |||
520 | 529 | | |
521 | 530 | | |
522 | 531 | | |
523 | | - | |
| 532 | + | |
524 | 533 | | |
525 | 534 | | |
526 | 535 | | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
527 | 545 | | |
528 | 546 | | |
529 | 547 | | |
| |||
769 | 787 | | |
770 | 788 | | |
771 | 789 | | |
| 790 | + | |
772 | 791 | | |
773 | 792 | | |
774 | 793 | | |
775 | 794 | | |
776 | 795 | | |
777 | 796 | | |
| 797 | + | |
778 | 798 | | |
779 | 799 | | |
780 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
2241 | 2241 | | |
2242 | 2242 | | |
2243 | 2243 | | |
2244 | | - | |
| 2244 | + | |
2245 | 2245 | | |
2246 | 2246 | | |
2247 | 2247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
81 | 99 | | |
82 | 100 | | |
83 | 101 | | |
| |||
87 | 105 | | |
88 | 106 | | |
89 | 107 | | |
90 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
91 | 116 | | |
92 | 117 | | |
93 | 118 | | |
| |||
136 | 161 | | |
137 | 162 | | |
138 | 163 | | |
139 | | - | |
| 164 | + | |
140 | 165 | | |
141 | 166 | | |
142 | 167 | | |
| |||
151 | 176 | | |
152 | 177 | | |
153 | 178 | | |
154 | | - | |
| 179 | + | |
155 | 180 | | |
156 | 181 | | |
157 | 182 | | |
158 | 183 | | |
159 | | - | |
| 184 | + | |
160 | 185 | | |
161 | 186 | | |
162 | 187 | | |
| |||
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
108 | 126 | | |
109 | 127 | | |
110 | 128 | | |
| |||
114 | 132 | | |
115 | 133 | | |
116 | 134 | | |
117 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
118 | 143 | | |
119 | 144 | | |
120 | 145 | | |
| |||
172 | 197 | | |
173 | 198 | | |
174 | 199 | | |
175 | | - | |
| 200 | + | |
176 | 201 | | |
177 | 202 | | |
178 | 203 | | |
| |||
181 | 206 | | |
182 | 207 | | |
183 | 208 | | |
184 | | - | |
| 209 | + | |
185 | 210 | | |
186 | 211 | | |
187 | 212 | | |
| |||
196 | 221 | | |
197 | 222 | | |
198 | 223 | | |
199 | | - | |
| 224 | + | |
200 | 225 | | |
201 | 226 | | |
202 | 227 | | |
203 | 228 | | |
204 | | - | |
| 229 | + | |
205 | 230 | | |
206 | 231 | | |
207 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
| |||
88 | 106 | | |
89 | 107 | | |
90 | 108 | | |
91 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
92 | 116 | | |
93 | 117 | | |
94 | 118 | | |
| |||
106 | 130 | | |
107 | 131 | | |
108 | 132 | | |
109 | | - | |
110 | | - | |
111 | 133 | | |
112 | 134 | | |
113 | 135 | | |
| |||
158 | 180 | | |
159 | 181 | | |
160 | 182 | | |
161 | | - | |
| 183 | + | |
162 | 184 | | |
163 | | - | |
| 185 | + | |
164 | 186 | | |
165 | 187 | | |
166 | 188 | | |
| |||
176 | 198 | | |
177 | 199 | | |
178 | 200 | | |
179 | | - | |
| 201 | + | |
180 | 202 | | |
181 | 203 | | |
182 | 204 | | |
183 | 205 | | |
184 | | - | |
| 206 | + | |
185 | 207 | | |
186 | 208 | | |
187 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
255 | 272 | | |
256 | 273 | | |
257 | 274 | | |
| |||
260 | 277 | | |
261 | 278 | | |
262 | 279 | | |
263 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
264 | 288 | | |
265 | 289 | | |
266 | 290 | | |
| |||
316 | 340 | | |
317 | 341 | | |
318 | 342 | | |
319 | | - | |
320 | | - | |
| 343 | + | |
321 | 344 | | |
322 | 345 | | |
323 | 346 | | |
| |||
332 | 355 | | |
333 | 356 | | |
334 | 357 | | |
335 | | - | |
| 358 | + | |
336 | 359 | | |
337 | 360 | | |
338 | 361 | | |
339 | | - | |
340 | | - | |
| 362 | + | |
341 | 363 | | |
342 | 364 | | |
343 | 365 | | |
| |||
0 commit comments