Skip to content

Commit 1b88571

Browse files
committed
Merge pull request #912 from practicalswift/asan-output
[crash triaging] Add AddressSanitizer (ASan) output to crash cases
2 parents 2da07db + 4ea2138 commit 1b88571

10 files changed

+23
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s
2+
3+
// ASAN Output: heap-buffer-overflow on address 0x610000007ffd at pc 0x0000009c9913 bp 0x7fff8de8ba90 sp 0x7fff8de8ba88
4+
25
#^

validation-test/compiler_crashers/08008-swift-typechecker-typecheckexpression.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
55
// Test case found by fuzzing
66

7-
class A:A.b{let b=Void{
7+
// ASAN Output: stack-overflow on address 0x7fffe2a98fd8 (pc 0x000001e12adb bp 0x7fffe2a992d0 sp 0x7fffe2a98f60 T0)
8+
9+
class A:A.b{let b=Void{

validation-test/compiler_crashers/21765-vtable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
55
// Test case found by fuzzing
66

7+
// ASAN Output: stack-overflow on address 0x7ffe8def3f70 (pc 0x000001cf1268 bp 0x7ffe8def48f0 sp 0x7ffe8def3f00 T0)
8+
79
func b<T {
810
class A : A.e {
911
func e: T.e

validation-test/compiler_crashers/24797-no-stacktrace.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Test case found by https://github.com/neilpa (neilpa)
55
// http://www.openradar.me/20220559
66

7+
// ASAN Output: stack-overflow on address 0x7ffe14a39f08 (pc 0x0000008b75dd bp 0x7ffe14a3a770 sp 0x7ffe14a39f10 T0)
8+
79
let values = [
810
0x0000,
911
0x0001,

validation-test/compiler_crashers/24798-no-stacktrace.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Test case found by https://github.com/neilpa (neilpa)
55
// http://www.openradar.me/20220559
66

7+
// ASAN Output: stack-overflow on address 0x7ffc82319f20 (pc 0x000001e54411 bp 0x7ffc8231a050 sp 0x7ffc82319ee0 T0)
8+
79
let records = [
810
0x0000: "",
911
0x0001: "",

validation-test/compiler_crashers/24887-no-stack-trace.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Distributed under the terms of the MIT license
33
// Test case submitted to project by https://github.com/codafi (Robert Widmann)
44

5+
// ASAN Output: stack-overflow on address 0x7ffc688c8fa8 (pc 0x0000008b75dd bp 0x7ffc688c9810 sp 0x7ffc688c8fb0 T0)
6+
57
struct X<T> {
6-
let s : X<X>
8+
let s : X<X>
79
}

validation-test/compiler_crashers/27636-swift-typechecker-resolvetypeincontext.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
55
// Test case found by fuzzing
66

7+
// ASAN Output: stack-overflow on address 0x7ffdcd2b1fd0 (pc 0x0000008ecf9e bp 0x7ffdcd2b2810 sp 0x7ffdcd2b1fc0 T0)
8+
79
enum A
810
protocol A{
911
typealias f:a

validation-test/compiler_crashers/27832-swift-typechecker-resolvetypeincontext.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
55
// Test case found by fuzzing
66

7+
// ASAN Output: stack-overflow on address 0x7ffd2c334fb0 (pc 0x0000008ecf9e bp 0x7ffd2c3357f0 sp 0x7ffd2c334fa0 T0)
8+
79
enum A
810
protocol A{
911
typealias f:a

validation-test/compiler_crashers/27939-vtable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
55
// Test case found by fuzzing
66

7+
// ASAN Output: stack-overflow on address 0x7ffdad0b1cd0 (pc 0x000001cf1268 bp 0x7ffdad0b2650 sp 0x7ffdad0b1c60 T0)
8+
79
func b<T {
810
class A : A.e {
911
func e: T.e

validation-test/compiler_crashers/28180-rawrepresentable-extension-with-initializer.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// RUN: not --crash %target-swift-frontend %s -parse
22

3+
// ASAN Output: stack-overflow on address 0x7fff31bf3ff8 (pc 0x0000022f8f44 bp 0x7fff31bf49d0 sp 0x7fff31bf4000 T0)
4+
35
extension RawRepresentable {
46
init?(rawValue optionalRawValue: RawValue?) {
57
guard let rawValue = optionalRawValue, value = Self(rawValue: rawValue) else { return nil }

0 commit comments

Comments
 (0)