Commit cc1d011
stackwalk: fix heuristic termination (#57801)
When getting stacktraces on non-X86 platforms, the first frame may not
have been set up yet, incorrectly triggering this bad-frame detection
logic. This should fix the issue of async unwind failing after only
getting 2 frames, if the first frame happens to land in the function
header. This is not normally an issue on X86 or non-signals, but also
causes no expected issues to be the same logic there too.
Fix #52334
After (on arm64-apple-darwin24.3.0):
```
julia> f(1)
Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.
ERROR: StackOverflowError:
Stacktrace:
[1] f(x::Int64)
@ Main ./REPL[3]:1
[2] g(x::Int64)
@ Main ./REPL[4]:1
--- the above 2 lines are repeated 39990 more times ---
[79983] f(x::Int64)
@ Main ./REPL[3]:1
```
n.b. This will not fix and is not related to any issues where profiling
gets only a single stack frame during profiling of syscalls on Apple
AArch64. This fix is specific to the bug where it gets exactly 2 frames.
(cherry picked from commit f82917a)1 parent b6d3b72 commit cc1d011
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
101 | | - | |
| 100 | + | |
| 101 | + | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| 138 | + | |
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
137 | 142 | | |
138 | | - | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
0 commit comments