Skip to content

[embedded] Fix compiler crash in getRuntimeEffect when processing ExistentialMetatypeInst #68500

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

Conversation

kubamracek
Copy link
Contributor

Fixes the following crash (showcased by the added testcase):

1.	Swift version 5.9-dev (LLVM 104f7296fe3d75d, Swift df4f824b02947ca)
2.	Compiling with effective version 4.1.50
3.	While evaluating request ExecuteSILPipelineRequest(Run pipelines { Mandatory Diagnostic Passes + Enabling Optimization Passes } on SIL for main)
4.	While running pass #93 SILModuleTransform "PerformanceDiagnostics".
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  swift-frontend           0x00000001095d2038 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x00000001095d145c llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x00000001095d2678 SignalHandler(int) + 304
3  libsystem_platform.dylib 0x00000001a516ea24 _sigtramp + 56
4  swift-frontend           0x00000001056f9384 swift::getRuntimeEffect(swift::SILInstruction*, swift::SILType&) + 1228
5  swift-frontend           0x00000001056f9384 swift::getRuntimeEffect(swift::SILInstruction*, swift::SILType&) + 1228
6  swift-frontend           0x00000001051bd6cc (anonymous namespace)::PerformanceDiagnostics::visitInst(swift::SILInstruction*, swift::PerformanceConstraints, (anonymous namespace)::PerformanceDiagnostics::LocWithParent*) + 60
7  swift-frontend           0x00000001051bcf64 (anonymous namespace)::PerformanceDiagnosticsPass::run() + 916
8  swift-frontend           0x00000001051ff774 swift::SILPassManager::runModulePass(unsigned int) + 800
9  swift-frontend           0x0000000105201894 swift::SILPassManager::execute() + 624
10 swift-frontend           0x00000001051fc9b0 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 72
11 swift-frontend           0x00000001051fc94c swift::ExecuteSILPipelineRequest::evaluate(swift::Evaluator&, swift::SILPipelineExecutionDescriptor) const + 52

@kubamracek kubamracek added the embedded Embedded Swift label Sep 13, 2023
@kubamracek
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kubamracek kubamracek merged commit 58b0ea9 into swiftlang:main Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Embedded Swift
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants