Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
ios_host_exclude_xcode_versions: '[{"xcode_version": "16.2"}, {"xcode_version": "16.3"}, {"xcode_version": "16.4"}]'
enable_wasm_sdk_build: true
enable_android_sdk_build: true
android_ndk_version: '["r28c"]'
soundness:
name: Soundness
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
Expand Down
10 changes: 8 additions & 2 deletions Sources/Testing/SourceAttribution/Backtrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public struct Backtrace: Sendable {
self.addresses = addresses.map { Address(UInt(bitPattern: $0)) }
}

#if os(Android) && !SWT_NO_DYNAMIC_LINKING
#if compiler(<6.3) && os(Android)
/// The `backtrace()` function.
///
/// This function was added to Android with API level 33, which is higher than
Expand Down Expand Up @@ -76,7 +76,13 @@ public struct Backtrace: Sendable {
initializedCount = .init(clamping: backtrace(addresses.baseAddress!, .init(clamping: addresses.count)))
}
#elseif os(Android)
#if !SWT_NO_DYNAMIC_LINKING
#if compiler(>=6.3)
if #available(Android 33, *) {
initializedCount = addresses.withMemoryRebound(to: UnsafeMutableRawPointer.self) { addresses in
.init(clamping: backtrace(addresses.baseAddress!, .init(clamping: addresses.count)))
}
}
#else
if let _backtrace {
initializedCount = .init(clamping: _backtrace(addresses.baseAddress!, .init(clamping: addresses.count)))
}
Expand Down