Skip to content

[swiftc (78 vs. 5175)] Add crasher in swift::TypeRepr::walk(...) #5327

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
Oct 17, 2016
Merged

[swiftc (78 vs. 5175)] Add crasher in swift::TypeRepr::walk(...) #5327

merged 1 commit into from
Oct 17, 2016

Conversation

practicalswift
Copy link
Contributor

Add test case for crash triggered in swift::TypeRepr::walk(...).

Current number of unresolved compiler crashers: 78 (5175 resolved)

Stack trace:

6  swift           0x000000000113673a swift::TypeRepr::walk(swift::ASTWalker&) + 42
9  swift           0x0000000001030a63 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 6547
10 swift           0x0000000001035430 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4320
11 swift           0x0000000000f5ed9f 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>) + 431
12 swift           0x0000000000f6183e swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 942
13 swift           0x0000000000f64a45 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 309
14 swift           0x0000000000f64c4d swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 237
17 swift           0x0000000000f75ff6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
20 swift           0x0000000000fe6d16 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 262
21 swift           0x000000000101293c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
22 swift           0x0000000000f618d4 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1092
25 swift           0x0000000000fe5ab3 swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 355
26 swift           0x0000000000fe5907 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 39
27 swift           0x0000000000fe650c swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 188
29 swift           0x0000000000f9b21b swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1291
30 swift           0x0000000000d11456 swift::CompilerInstance::performSema() + 3350
31 swift           0x000000000085ddee swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3422
32 swift           0x00000000008252ae main + 2878
Stack dump:
0.  Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28441-swift-typerepr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28441-swift-typerepr-walk-dca6bf.o
1.  While type-checking 'a' at validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:1
2.  While type-checking expression at [validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:10 - line:9:21] RangeText="{var _=[T:b}"
3.  While type-checking declaration 0x5ff47d8 at validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:11
4.  While type-checking expression at [validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:17 - line:9:20] RangeText="[T:b"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)

Add test case for crash triggered in `swift::TypeRepr::walk(...)`.

Current number of unresolved compiler crashers: 78 (5175 resolved)

Stack trace:

```
6  swift           0x000000000113673a swift::TypeRepr::walk(swift::ASTWalker&) + 42
9  swift           0x0000000001030a63 swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*) + 6547
10 swift           0x0000000001035430 swift::constraints::ConstraintSystem::salvage(llvm::SmallVectorImpl<swift::constraints::Solution>&, swift::Expr*) + 4320
11 swift           0x0000000000f5ed9f 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>) + 431
12 swift           0x0000000000f6183e swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 942
13 swift           0x0000000000f64a45 swift::TypeChecker::typeCheckBinding(swift::Pattern*&, swift::Expr*&, swift::DeclContext*) + 309
14 swift           0x0000000000f64c4d swift::TypeChecker::typeCheckPatternBinding(swift::PatternBindingDecl*, unsigned int) + 237
17 swift           0x0000000000f75ff6 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
20 swift           0x0000000000fe6d16 swift::TypeChecker::typeCheckClosureBody(swift::ClosureExpr*) + 262
21 swift           0x000000000101293c swift::constraints::ConstraintSystem::applySolution(swift::constraints::Solution&, swift::Expr*, swift::Type, bool, bool, bool) + 812
22 swift           0x0000000000f618d4 swift::TypeChecker::typeCheckExpression(swift::Expr*&, swift::DeclContext*, swift::TypeLoc, swift::ContextualTypePurpose, swift::OptionSet<swift::TypeCheckExprFlags, unsigned int>, swift::ExprTypeCheckListener*, swift::constraints::ConstraintSystem*) + 1092
25 swift           0x0000000000fe5ab3 swift::TypeChecker::typeCheckFunctionBodyUntil(swift::FuncDecl*, swift::SourceLoc) + 355
26 swift           0x0000000000fe5907 swift::TypeChecker::typeCheckAbstractFunctionBodyUntil(swift::AbstractFunctionDecl*, swift::SourceLoc) + 39
27 swift           0x0000000000fe650c swift::TypeChecker::typeCheckAbstractFunctionBody(swift::AbstractFunctionDecl*) + 188
29 swift           0x0000000000f9b21b swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int, unsigned int) + 1291
30 swift           0x0000000000d11456 swift::CompilerInstance::performSema() + 3350
31 swift           0x000000000085ddee swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3422
32 swift           0x00000000008252ae main + 2878
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28441-swift-typerepr-walk.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28441-swift-typerepr-walk-dca6bf.o
1.	While type-checking 'a' at validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:1
2.	While type-checking expression at [validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:10 - line:9:21] RangeText="{var _=[T:b}"
3.	While type-checking declaration 0x5ff47d8 at validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:11
4.	While type-checking expression at [validation-test/compiler_crashers/28441-swift-typerepr-walk.swift:9:17 - line:9:20] RangeText="[T:b"
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
@practicalswift
Copy link
Contributor Author

@swift-ci please smoke test and merge

1 similar comment
@practicalswift
Copy link
Contributor Author

@swift-ci please smoke test and merge

@practicalswift
Copy link
Contributor Author

@swift-ci please test and merge

@swift-ci swift-ci merged commit 11429a8 into swiftlang:master Oct 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants