Skip to content

Commit 2c638ad

Browse files
[swiftc (43 vs. 5420)] Add crasher in swift::CleanupIllFormedExpressionRAII::doIt
Add test case for crash triggered in `swift::CleanupIllFormedExpressionRAII::doIt`. Current number of unresolved compiler crashers: 43 (5420 resolved) Stack trace: ``` 0 0x0000000003525d58 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/path/to/swift/bin/swift+0x3525d58) 1 0x0000000003526496 SignalHandler(int) (/path/to/swift/bin/swift+0x3526496) 2 0x00007fb367bf33e0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0) 3 0x0000000000cffd2d swift::CleanupIllFormedExpressionRAII::doIt(swift::Expr*, swift::ASTContext&)::CleanupIllFormedExpression::walkToExprPre(swift::Expr*) (/path/to/swift/bin/swift+0xcffd2d) 4 0x0000000000e1b277 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xe1b277) 5 0x0000000000e1b2a1 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Expr*) (/path/to/swift/bin/swift+0xe1b2a1) 6 0x0000000000e1853b swift::Expr::walk(swift::ASTWalker&) (/path/to/swift/bin/swift+0xe1853b) 7 0x0000000000cf4ccf swift::CleanupIllFormedExpressionRAII::~CleanupIllFormedExpressionRAII() (/path/to/swift/bin/swift+0xcf4ccf) 8 0x0000000000c994b3 swift::constraints::ConstraintSystem::Candidate::solve() (/path/to/swift/bin/swift+0xc994b3) 9 0x0000000000c9b708 swift::constraints::ConstraintSystem::shrink(swift::Expr*) (/path/to/swift/bin/swift+0xc9b708) 10 0x0000000000c9b861 swift::constraints::ConstraintSystem::solve(swift::Expr*&, swift::Type, swift::ExprTypeCheckListener*, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::FreeTypeVariableBinding) (/path/to/swift/bin/swift+0xc9b861) 11 0x0000000000cf4eb4 swift::TypeChecker::solveForExpression(swift::Expr*&, swift::DeclContext*, swift::Type, swift::FreeTypeVariableBinding, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem&, llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>) (/path/to/swift/bin/swift+0xcf4eb4) 12 0x0000000000cf83d6 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) (/path/to/swift/bin/swift+0xcf83d6) 13 0x0000000000c1113e swift::ASTVisitor<(anonymous namespace)::StmtChecker, void, swift::Stmt*, void, void, void, void>::visit(swift::Stmt*) (/path/to/swift/bin/swift+0xc1113e) 14 0x0000000000c10966 swift::TypeChecker::typeCheckTopLevelCodeDecl(swift::TopLevelCodeDecl*) (/path/to/swift/bin/swift+0xc10966) 15 0x0000000000c26790 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) (/path/to/swift/bin/swift+0xc26790) 16 0x000000000099a1a6 swift::CompilerInstance::performSema() (/path/to/swift/bin/swift+0x99a1a6) 17 0x000000000047d381 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/path/to/swift/bin/swift+0x47d381) 18 0x000000000043b2b7 main (/path/to/swift/bin/swift+0x43b2b7) 19 0x00007fb366544830 __libc_start_main /build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0 20 0x00000000004386f9 _start (/path/to/swift/bin/swift+0x4386f9) ```
1 parent 93adaf1 commit 2c638ad

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
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 - 2017 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+
// REQUIRES: deterministic-behavior
9+
// RUN: not --crash %target-swift-frontend %s -emit-ir
10+
d}let x[{{{}|[{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{let d

0 commit comments

Comments
 (0)