Commit ef3134c
committed
[lldb][swift] Mark async unwinding plans as SourcedFromCompiler
LLDB always attempts to check other unwinding plans when an unwind plan
produces a CFA == 0. It does so because it doesn't distinguish the case
where the plan truly produced the end of the stack versus the case where
the plan was faulty.
We need a mechanism to disable this for swift async plans: if the
language runtime constructs such a plan, then that plan will correctly
identify the bottom of the stack. Checking other plans is harmless in
non-async settings (they would just produce the same backtrace), but it
is harmful for async virtual backtraces, as a "regular" unwind plan
would produce a real backtrace if it were asked to start from the top of
the stack (which would happen in short backtraces).
Until such mechanism exists, we can work around the issue by claiming
swift async plans are "sourced from compiler", which seem to disable the
fallback mechanism because plans sourced from the compiler are
considered the most reliable plans.
rdar://1426836221 parent ad53c6a commit ef3134c
File tree
4 files changed
+50
-2
lines changed- lldb
- source/Plugins/LanguageRuntime/Swift
- test/API/lang/swift/async/unwind/short_unwind
4 files changed
+50
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2426 | 2426 | | |
2427 | 2427 | | |
2428 | 2428 | | |
2429 | | - | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
2430 | 2432 | | |
2431 | 2433 | | |
2432 | 2434 | | |
| |||
2466 | 2468 | | |
2467 | 2469 | | |
2468 | 2470 | | |
2469 | | - | |
| 2471 | + | |
| 2472 | + | |
| 2473 | + | |
2470 | 2474 | | |
2471 | 2475 | | |
2472 | 2476 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 26 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 | + | |
Lines changed: 15 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 | + | |
0 commit comments