Skip to content

Commit

Permalink
Merge pull request #912 from practicalswift/asan-output
Browse files Browse the repository at this point in the history
[crash triaging] Add AddressSanitizer (ASan) output to crash cases
  • Loading branch information
gribozavr committed Jan 8, 2016
2 parents 2da07db + 4ea2138 commit 1b88571
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
// RUN: not --crash %target-swift-ide-test -code-completion -code-completion-token=A -source-filename=%s

// ASAN Output: heap-buffer-overflow on address 0x610000007ffd at pc 0x0000009c9913 bp 0x7fff8de8ba90 sp 0x7fff8de8ba88

#^
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

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

class A:A.b{let b=Void{
2 changes: 2 additions & 0 deletions validation-test/compiler_crashers/21765-vtable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

// ASAN Output: stack-overflow on address 0x7ffe8def3f70 (pc 0x000001cf1268 bp 0x7ffe8def48f0 sp 0x7ffe8def3f00 T0)

func b<T {
class A : A.e {
func e: T.e
2 changes: 2 additions & 0 deletions validation-test/compiler_crashers/24797-no-stacktrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Test case found by https://github.com/neilpa (neilpa)
// http://www.openradar.me/20220559

// ASAN Output: stack-overflow on address 0x7ffe14a39f08 (pc 0x0000008b75dd bp 0x7ffe14a3a770 sp 0x7ffe14a39f10 T0)

let values = [
0x0000,
0x0001,
Expand Down
2 changes: 2 additions & 0 deletions validation-test/compiler_crashers/24798-no-stacktrace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Test case found by https://github.com/neilpa (neilpa)
// http://www.openradar.me/20220559

// ASAN Output: stack-overflow on address 0x7ffc82319f20 (pc 0x000001e54411 bp 0x7ffc8231a050 sp 0x7ffc82319ee0 T0)

let records = [
0x0000: "",
0x0001: "",
Expand Down
4 changes: 3 additions & 1 deletion validation-test/compiler_crashers/24887-no-stack-trace.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/codafi (Robert Widmann)

// ASAN Output: stack-overflow on address 0x7ffc688c8fa8 (pc 0x0000008b75dd bp 0x7ffc688c9810 sp 0x7ffc688c8fb0 T0)

struct X<T> {
let s : X<X>
let s : X<X>
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

// ASAN Output: stack-overflow on address 0x7ffdcd2b1fd0 (pc 0x0000008ecf9e bp 0x7ffdcd2b2810 sp 0x7ffdcd2b1fc0 T0)

enum A
protocol A{
typealias f:a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

// ASAN Output: stack-overflow on address 0x7ffd2c334fb0 (pc 0x0000008ecf9e bp 0x7ffd2c3357f0 sp 0x7ffd2c334fa0 T0)

enum A
protocol A{
typealias f:a
Expand Down
2 changes: 2 additions & 0 deletions validation-test/compiler_crashers/27939-vtable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing

// ASAN Output: stack-overflow on address 0x7ffdad0b1cd0 (pc 0x000001cf1268 bp 0x7ffdad0b2650 sp 0x7ffdad0b1c60 T0)

func b<T {
class A : A.e {
func e: T.e
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// RUN: not --crash %target-swift-frontend %s -parse

// ASAN Output: stack-overflow on address 0x7fff31bf3ff8 (pc 0x0000022f8f44 bp 0x7fff31bf49d0 sp 0x7fff31bf4000 T0)

extension RawRepresentable {
init?(rawValue optionalRawValue: RawValue?) {
guard let rawValue = optionalRawValue, value = Self(rawValue: rawValue) else { return nil }
Expand Down

0 comments on commit 1b88571

Please sign in to comment.