Skip to content

Commit e2b2c0f

Browse files
[swiftc (136 vs. 5221)] Add crasher in swift::ASTVisitor
Add test case for crash triggered in `swift::ASTVisitor`. Current number of unresolved compiler crashers: 136 (5221 resolved) Stack trace: ``` 0 0x00000000033b4608 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x33b4608) 1 0x00000000033b4d46 SignalHandler(int) (/path/to/swift/bin/swift+0x33b4d46) 2 0x00007f0d42a1d3e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0) 3 0x00007f0d4114b428 gsignal /build/glibc-Qz8a69/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0 4 0x00007f0d4114d02a abort /build/glibc-Qz8a69/glibc-2.23/stdlib/abort.c:91:0 5 0x0000000000db00ab (/path/to/swift/bin/swift+0xdb00ab) 6 0x0000000000da4d6f (anonymous namespace)::Verifier::walkToDeclPost(swift::Decl*) (/path/to/swift/bin/swift+0xda4d6f) 7 0x0000000000db2c5e (anonymous namespace)::Traversal::doIt(swift::Decl*) (/path/to/swift/bin/swift+0xdb2c5e) 8 0x0000000000db5718 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb5718) 9 0x0000000000db2f35 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xdb2f35) 10 0x0000000000db56b4 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xdb56b4) 11 0x0000000000db2804 (anonymous namespace)::Traversal::doIt(swift::Decl*) (/path/to/swift/bin/swift+0xdb2804) 12 0x0000000000db2594 swift::Decl::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xdb2594) 13 0x0000000000e0a05e swift::SourceFile::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xe0a05e) 14 0x0000000000d9b715 swift::verify(swift::SourceFile&) (/path/to/swift/bin/swift+0xd9b715) 15 0x0000000000c59d59 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0xc59d59) 16 0x00000000009782d6 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x9782d6) 17 0x000000000047b02c performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47b02c) 18 0x0000000000479f1e swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x479f1e) 19 0x0000000000439a17 main (/path/to/swift/bin/swift+0x439a17) 20 0x00007f0d41136830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0 21 0x0000000000436e59 _start (/path/to/swift/bin/swift+0x436e59) ```
1 parent a3e56f8 commit e2b2c0f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// This source file is part of the Swift.org open source project
2+
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
3+
// Licensed under Apache License v2.0 with Runtime Library Exception
4+
//
5+
// See https://swift.org/LICENSE.txt for license information
6+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
7+
8+
// RUN: not --crash %target-swift-frontend %s -emit-ir
9+
{return B
10+
override class B

0 commit comments

Comments
 (0)