We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 938d659 + 4c47540 commit 3494c40Copy full SHA for 3494c40
stdlib/public/libexec/swift-backtrace/TargetMacOS.swift
@@ -249,11 +249,12 @@ class Target {
249
250
if info.thread_id == crashingThread {
251
ctx = HostContext.fromHostMContext(mcontext)
252
- crashingThreadNdx = Int(ndx)
+ crashingThreadNdx = threads.count
253
} else {
254
guard let threadCtx = HostContext.fromHostThread(ports[Int(ndx)]) else {
255
// This can happen legitimately, e.g. when looking at a Rosetta 2
256
// process, where there are ARM64 threads AS WELL AS the x86_64 ones.
257
+ mach_port_deallocate(mach_task_self_, ports[Int(ndx)])
258
continue
259
}
260
ctx = threadCtx
0 commit comments