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-979] Two inout crash compiler and source editor (Swift DEV Snapshots 2016-03-16) #43591

Closed
swift-ci opened this issue Mar 18, 2016 · 1 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 good first issue Good for newcomers parser Area → compiler: The legacy C++ parser

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-979
Radar None
Original Reporter Loooop (JIRA User)
Type Bug
Status Closed
Resolution Done

Attachment: Download

Environment

Xcode 7.3 beta 5 with Swift DEV Snapshots 2016-03-16

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, Parser, StarterBug
Assignee manav (JIRA)
Priority Medium

md5: a73ab551a87542c95d46bb71dfd86f6e

Issue Description:

The following invalid code crash compiler and source editor (Swift DEV Snapshots 2016-03-16):

func bug( a: inout inout Int ) {}

Result:

Assertion failed: (!objectTy->is<LValueType>() && !objectTy->is<InOutType>() && "cannot have 'inout' or @lvalue wrapped inside an 'inout'"), function get, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/lib/AST/ASTContext.cpp, line 3297.
0  swift                    0x0000000103e9b8ab llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  swift                    0x0000000103e9ab66 llvm::sys::RunSignalHandlers() + 70
2  swift                    0x0000000103e9bf52 SignalHandler(int) + 322
3  libsystem_platform.dylib 0x00007fff9292ceaa _sigtramp + 26
4  swift                    0x0000000104953615 FirstTarget + 72141
5  swift                    0x0000000103e9bd66 abort + 22
6  swift                    0x0000000103e9bd41 __assert_rtn + 81
7  swift                    0x0000000101de6b68 swift::InOutType::get(swift::Type) + 584
8  swift                    0x0000000101dbab71 (anonymous namespace)::TypeResolver::resolveType(swift::TypeRepr*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>) + 1825
9  swift                    0x0000000101dba3ee swift::TypeChecker::resolveType(swift::TypeRepr*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 174
10 swift                    0x0000000101db94ff swift::TypeChecker::validateType(swift::TypeLoc&, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, llvm::function_ref<bool (swift::TypeCheckRequest)>*) + 47
11 swift                    0x0000000101d8fc71 validateParameterType(swift::ParamDecl*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*, swift::TypeChecker&) + 97
12 swift                    0x0000000101d8fb03 swift::TypeChecker::typeCheckParameterList(swift::ParameterList*, swift::DeclContext*, swift::OptionSet<swift::TypeResolutionFlags, unsigned int>, swift::GenericTypeResolver*) + 115
13 swift                    0x0000000101d61717 (anonymous namespace)::DeclChecker::visitFuncDecl(swift::FuncDecl*) + 2439
14 swift                    0x0000000101d530cb (anonymous namespace)::DeclChecker::visit(swift::Decl*) + 827
15 swift                    0x0000000101d52d77 swift::TypeChecker::typeCheckDecl(swift::Decl*, bool) + 151
16 swift                    0x0000000101d74fd1 swift::performTypeChecking(swift::SourceFile&, swift::TopLevelContext&, swift::OptionSet<swift::TypeCheckingFlags, unsigned int>, unsigned int) + 1281
17 swift                    0x0000000101b3b118 swift::CompilerInstance::performSema() + 4616
18 swift                    0x000000010157d086 performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&) + 790
19 swift                    0x000000010157c136 frontend_main(llvm::ArrayRef<char const*>, char const*, void*) + 2838
20 swift                    0x0000000101577479 main + 2729
21 libdyld.dylib            0x00007fff86c325ad start + 1

P.S. I don't know which Components/Labels check for source editor crash.

@swift-ci
Copy link
Collaborator Author

Comment by Manav Gabhawala (JIRA)

Fixed in: #1812

@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
This issue was closed.
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 good first issue Good for newcomers parser Area → compiler: The legacy C++ parser
Projects
None yet
Development

No branches or pull requests

2 participants