mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
These tests are marked XFAIL or UNSUPPORTED because either the tests: require libc annotation, require Mach-O support, don't recognize calls to swift-autolink-extract, requires porting alongside Linux, or rely on simd which is not present. Additionally, explicit REQUIRES for tsan/asan/fuzzer are added to some tests, since OpenBSD does not support these sanitizers or fuzzers, since it's nicer to mark that with REQUIRES rather than XFAIL.
24 lines
592 B
Swift
24 lines
592 B
Swift
// REQUIRES: asan_runtime
|
|
// This test verifies that we add the function attributes used by ASan.
|
|
|
|
// RUN: %target-swift-frontend -emit-ir -sanitize=address %s | %FileCheck %s -check-prefix=ASAN
|
|
|
|
// ASAN: define {{.*}} @"$s4main4testyyF"() [[DEFAULT_ATTRS:#[0-9]+]]
|
|
public func test() {
|
|
}
|
|
|
|
// ASAN: define {{.*}} @"$s4main1xSivr"({{.*}}) [[COROUTINE_ATTRS:#[0-9]+]]
|
|
public var x: Int {
|
|
_read {
|
|
yield 0
|
|
}
|
|
}
|
|
|
|
// ASAN: attributes [[DEFAULT_ATTRS]] =
|
|
// ASAN-SAME: sanitize_address
|
|
// ASAN-SAME: }
|
|
|
|
// ASAN: attributes [[COROUTINE_ATTRS]] =
|
|
// ASAN-SAME: sanitize_address
|
|
// ASAN-SAME: }
|