Skip to content

[swiftc] Add test case for crash triggered in swift::ValueDecl::setType(…) #2449

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
May 9, 2016
Merged

[swiftc] Add test case for crash triggered in swift::ValueDecl::setType(…) #2449

merged 1 commit into from
May 9, 2016

Conversation

practicalswift
Copy link
Contributor

What's in this pull request?

Crash case with stack trace:

swift: /path/to/swift/lib/AST/Decl.cpp:1655: void swift::ValueDecl::setType(swift::Type): Assertion `!hasType() && "changing type of declaration"' failed.
8  swift           0x000000000108473c swift::ValueDecl::setType(swift::Type) + 92
9  swift           0x0000000000e788cc swift::configureConstructorType(swift::ConstructorDecl*, swift::Type, swift::Type, bool) + 428
14 swift           0x0000000000e7bf36 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
15 swift           0x0000000000e9d962 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 994
16 swift           0x0000000000c37c0f swift::CompilerInstance::performSema() + 3295
18 swift           0x00000000007c5e46 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2838
19 swift           0x0000000000791ed8 main + 2840
Stack dump:
0.  Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28292-swift-valuedecl-settype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28292-swift-valuedecl-settype-ee60c6.o
1.  While type-checking 'a' at validation-test/compiler_crashers/28292-swift-valuedecl-settype.swift:10:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)

Resolved bug number: –


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

…pe(swift::Type)

Stack trace:

```
swift: /path/to/swift/lib/AST/Decl.cpp:1655: void swift::ValueDecl::setType(swift::Type): Assertion `!hasType() && "changing type of declaration"' failed.
8  swift           0x000000000108473c swift::ValueDecl::setType(swift::Type) + 92
9  swift           0x0000000000e788cc swift::configureConstructorType(swift::ConstructorDecl*, swift::Type, swift::Type, bool) + 428
14 swift           0x0000000000e7bf36 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 150
15 swift           0x0000000000e9d962 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 994
16 swift           0x0000000000c37c0f swift::CompilerInstance::performSema() + 3295
18 swift           0x00000000007c5e46 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2838
19 swift           0x0000000000791ed8 main + 2840
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28292-swift-valuedecl-settype.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28292-swift-valuedecl-settype-ee60c6.o
1.	While type-checking 'a' at validation-test/compiler_crashers/28292-swift-valuedecl-settype.swift:10:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
@gribozavr
Copy link
Contributor

@swift-ci Please test and merge

@gribozavr
Copy link
Contributor

CI failure is unrelated.

@gribozavr gribozavr merged commit 967fa1d into swiftlang:master May 9, 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