Skip to content
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

[SR-6767] [TypeChecker/Assertion] argument passed to call that takes no arguments #49316

Open
dcci mannequin opened this issue Jan 15, 2018 · 2 comments
Open

[SR-6767] [TypeChecker/Assertion] argument passed to call that takes no arguments #49316

dcci mannequin opened this issue Jan 15, 2018 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software newfuzz PlaygroundTransform

Comments

@dcci
Copy link
Mannequin

dcci mannequin commented Jan 15, 2018

Previous ID SR-6767
Radar None
Original Reporter @dcci
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, PlaygroundTransform, newfuzz
Assignee None
Priority Medium

md5: b639f75902eb7b0454f44fc5bc111245

Issue Description:

$ ./run.sh red2.swift
red2.swift:5:5: warning: immutable value 'i' was never used; consider replacing with '_' or removing it
for i in 0..<3 {
    ^
    _
red2.swift:7:5: warning: immutable value 'i' was never used; consider replacing with '_' or removing it
for i in 0..<3 {
    ^
    _
argument passed to call that takes no arguments
0  swiftc                   0x000000010468c16a PrintStackTraceSignalHandler(void*) + 42
1  swiftc                   0x000000010468b526 SignalHandler(int) + 966
2  libsystem_platform.dylib 0x00007fff63331f5a _sigtramp + 26
3  libsystem_platform.dylib 0x00007ffeeef318b0 _sigtramp + 2344614256
4  swiftc                   0x0000000102044869 swift::ASTVisitor<(anonymous namespace)::Traversal, swift::Expr*, swift::Stmt*, bool, swift::Pattern*, bool, void>::visit(swift::Stmt*) +
425
5  swiftc                   0x0000000101d6126d swift::TypeChecker::checkFunctionErrorHandling(swift::AbstractFunctionDecl*) + 525
6  swiftc                   0x0000000101cebb4f swift::performPCMacro(swift::SourceFile&, swift::TopLevelContext&)::ExpressionFinder::walkToDeclPre(swift::Decl*) + 2367
7  swiftc                   0x0000000102043e41 (anonymous namespace)::Traversal::doIt(swift::Decl*) + 273
8  swiftc                   0x0000000101a722ef swift::CompilerInstance::performSema() + 5679
9  swiftc                   0x0000000100d42558 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 1704
10 swiftc                   0x0000000100d40444 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7876
11 swiftc                   0x0000000100cf5205 main + 18917
12 libdyld.dylib            0x00007fff630b0115 start + 1
13 libdyld.dylib            0x0000000000000006 start + 2633301746
Stack dump:
0.      Program arguments: 
swiftc -frontend -c -primary-file red2.swift -pc-macro
./run.sh: line 4: 95284 Segmentation fault: 11  swiftc -frontend -c -primary-file $1 -pc-macro

Testcase:

func __builtin_pc_before(_ sl : Int, _ el : Int, _ sc : Int, _ ec: Int) {
}
func __builtin_pc_after() {
}
for i in 0..<3 {
}
for i in 0..<3 {
}
@dcci
Copy link
Mannequin Author

dcci mannequin commented Jan 15, 2018

cc: @adrian-prantl/@vedantk

@dcci
Copy link
Mannequin Author

dcci mannequin commented Jan 15, 2018

Oops, sorry, I cc'ed you on the wrong bug 🙂

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software newfuzz PlaygroundTransform
Projects
None yet
Development

No branches or pull requests

1 participant