Skip to content

[crash triaging] Add AddressSanitizer (ASan) output to crash cases #912

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2016
Merged
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
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