Skip to content

Commit a455bb8

Browse files
authored
Merge pull request #70125 from w6sec/swift-inspect-oops-redo-mikes-changes
[swift-inspect] Again: Fix integer type mismatch on watchOS build.
2 parents 556c503 + 6a26503 commit a455bb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/swift-inspect/Sources/swift-inspect/Operations/DumpGenericMetadata.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ internal struct DumpGenericMetadata: ParsableCommand {
114114
? [swift_reflection_ptr_t:[swift_reflection_ptr_t]]()
115115
: try process.context.allocationStacks
116116

117-
let generics: [Metadata] = allocations.compactMap { allocation in
117+
let generics: [Metadata] = allocations.compactMap { allocation -> Metadata? in
118118
let pointer = swift_reflection_allocationMetadataPointer(process.context, allocation)
119119
if pointer == 0 { return nil }
120-
let allocation = allocations.last(where: { pointer >= $0.ptr && pointer < $0.ptr + UInt64($0.size) })
120+
let allocation = allocations.last(where: { pointer >= $0.ptr && pointer < $0.ptr + swift_reflection_ptr_t($0.size) })
121121
let garbage = (allocation == nil && swift_reflection_ownsAddressStrict(process.context, UInt(pointer)) == 0)
122122
var currentBacktrace: String?
123123
if let style = backtraceOptions.style, let allocation, let stack = stacks[allocation.ptr] {

0 commit comments

Comments
 (0)