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-14550] Crash when compiling swift-protobuf tests in release mode in Swift 5.4-RELEASE #56902

Closed
Lukasa opened this issue Apr 29, 2021 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@Lukasa
Copy link
Contributor

Lukasa commented Apr 29, 2021

Previous ID SR-14550
Radar rdar://problem/77325585
Original Reporter @Lukasa
Type Bug
Status Resolved
Resolution Done
Environment

Swift 5.4-RELEASE

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 7cb6a235f5491d0b4eb87fcd4079360d

Issue Description:

The following command for swift protobuf produces a compiler crash in Swift 5.4-RELEASE: swift test -c release -Xswiftc -enable-testing.

To reproduce, clone swift-protobuf (git clone https://github.com/apple/swift-protobuf) and checkout revision fefa1cdf89e811dfcfa121be86ba4a6a52933f0f. Run the above command line and the crash happens deterministically.

Annoyingly, there isn't much in the way of logging: the output is only error: fatalError. Grabbing a stack from the crashing process I got the following backtrace:

(lldb) bt
* thread #​1, name = 'swift-frontend', stop reason = signal SIGABRT
  * frame #​0: 0x00007f8ac7ae1fb7 libc.so.6`raise + 199
    frame #​1: 0x00007f8ac7ae39fb libc.so.6`abort + 539
    frame #&#8203;2: 0x00000000012e5b2d swift-frontend`(anonymous namespace)::SILVerifier::_require(bool, llvm::Twine const&, std::function<void ()> const&) + 1725
    frame #&#8203;3: 0x0000000001306a45 swift-frontend`(anonymous namespace)::SILVerifier::visitSILInstruction(swift::SILInstruction*) + 3077
    frame #&#8203;4: 0x00000000012f8d08 swift-frontend`swift::SILInstructionVisitor<(anonymous namespace)::SILVerifier, void>::visit(swift::SILInstruction*) + 57896
    frame #&#8203;5: 0x00000000012ea4ee swift-frontend`(anonymous namespace)::SILVerifier::visitSILBasicBlock(swift::SILBasicBlock*) + 1438
    frame #&#8203;6: 0x00000000012e89f6 swift-frontend`(anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction*) + 9990
    frame #&#8203;7: 0x00000000012e0d5e swift-frontend`swift::SILFunction::verify(bool) const + 62
    frame #&#8203;8: 0x0000000000fa06db swift-frontend`(anonymous namespace)::OwnershipModelEliminator::run() + 155
    frame #&#8203;9: 0x0000000000b0b7b2 swift-frontend`swift::SILPassManager::runPassOnFunction(unsigned int, swift::SILFunction*) + 1650
    frame #&#8203;10: 0x0000000000b0c631 swift-frontend`swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) + 1185
    frame #&#8203;11: 0x0000000000b0f4fe swift-frontend`swift::SILPassManager::execute() + 590
    frame #&#8203;12: 0x0000000000b09bb8 swift-frontend`swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 56
    frame #&#8203;13: 0x0000000000b09b6b swift-frontend`swift::ExecuteSILPipelineRequest::evaluate(swift::Evaluator&, swift::SILPipelineExecutionDescriptor) const + 59
    frame #&#8203;14: 0x0000000000b26e2a swift-frontend`swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 26
    frame #&#8203;15: 0x0000000000b14aa1 swift-frontend`llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 465
    frame #&#8203;16: 0x0000000000b09d85 swift-frontend`swift::executePassPipelinePlan(swift::SILModule*, swift::SILPassPipelinePlan const&, bool, swift::irgen::IRGenModule*) + 69
    frame #&#8203;17: 0x0000000000b1732f swift-frontend`swift::runSILOptimizationPasses(swift::SILModule&) + 143
    frame #&#8203;18: 0x00000000006a15bd swift-frontend`swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 637
    frame #&#8203;19: 0x000000000051c13d swift-frontend`performCompileStepsPostSILGen(swift::CompilerInstance&, std::unique_ptr<swift::SILModule, std::default_delete<swift::SILModule> >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 877
    frame #&#8203;20: 0x000000000051bb7c swift-frontend`performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 524
    frame #&#8203;21: 0x0000000000510710 swift-frontend`swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 5664
    frame #&#8203;22: 0x000000000049be53 swift-frontend`main + 883
    frame #&#8203;23: 0x00007f8ac7ac4bf7 libc.so.6`__libc_start_main + 231
    frame #&#8203;24: 0x000000000049b96a swift-frontend`_start + 42
@Lukasa
Copy link
Contributor Author

Lukasa commented Apr 29, 2021

@swift-ci create

@Lukasa
Copy link
Contributor Author

Lukasa commented Sep 21, 2021

This is now resolved.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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
Projects
None yet
Development

No branches or pull requests

1 participant