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-13751] isActuallyCanonicalOrNull assertion #56148

Open
swift-ci opened this issue Oct 18, 2020 · 3 comments
Open

[SR-13751] isActuallyCanonicalOrNull assertion #56148

swift-ci opened this issue Oct 18, 2020 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-13751
Radar rdar://problem/70701205
Original Reporter polac24 (JIRA User)
Type Bug
Environment

Xcode: 12.0.0
macOS: 10.15.6 (19G2021)
swift: swift-DEVELOPMENT-SNAPSHOT-2020-10-07-a.xctoolchain

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

md5: 1f09077ed52d56616e3fd647e843c706

Issue Description:

Compiling a swift file crashes on an assert.

Snapshot: swift-DEVELOPMENT-SNAPSHOT-2020-10-07-a.xctoolchain
I cannot correlate a source line that causes a crash/assert.

Error: Assertion failed: (isActuallyCanonicalOrNull() && "Forming a CanType out of a non-canonical type!"), function CanType, file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swift/include/swift/AST/Type.h, line 402.

Here is a backtrace:

1.  Apple Swift version 5.3-dev (LLVM 240312aa7333e90, Swift 15bf0478ad7c47c)
2.  While evaluating request IRGenRequest(IR Generation for file "/Absolutepath/Sourcefile.swift")
3.  While evaluating request ExecuteSILPipelineRequest(Run pipelines { IRGen Preparation } on SIL for SpotifyURI.SpotifyURI)
4.  While running pass #​1018 SILModuleTransform "LoadableByAddress".
0  swift-frontend           0x000000010ba86e45 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
1  swift-frontend           0x000000010ba860a5 llvm::sys::RunSignalHandlers() + 85
2  swift-frontend           0x000000010ba87416 SignalHandler(int) + 262
3  libsystem_platform.dylib 0x00007fff72a745fd _sigtramp + 29
4  libsystem_platform.dylib 0x0000000000005a30 _sigtramp + 18446603338592621648
5  libsystem_c.dylib        0x00007fff7294a808 abort + 120
6  libsystem_c.dylib        0x00007fff72949ac6 err + 0
7  swift-frontend           0x000000010bde3393 swift::SILBuilder::createTuple(swift::SILLocation, llvm::ArrayRef<swift::SILValue>) (.cold.1) + 35
8  swift-frontend           0x0000000107e291fb swift::SILBuilder::createTuple(swift::SILLocation, llvm::ArrayRef<swift::SILValue>) + 507
9  swift-frontend           0x00000001076dd0bc (anonymous namespace)::LoadableByAddress::run() + 4364
10 swift-frontend           0x0000000107a995fe swift::SILPassManager::runModulePass(unsigned int) + 558
11 swift-frontend           0x0000000107a9e01a swift::SILPassManager::execute() + 666
12 swift-frontend           0x0000000107a96398 swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 72
13 swift-frontend           0x0000000107a96333 swift::ExecuteSILPipelineRequest::evaluate(swift::Evaluator&, swift::SILPipelineExecutionDescriptor) const + 51
14 swift-frontend           0x0000000107ab8a1d swift::SimpleRequest<swift::ExecuteSILPipelineRequest, std::__1::tuple<> (swift::SILPipelineExecutionDescriptor), (swift::RequestFlags)1>::evaluateRequest(swift::ExecuteSILPipelineRequest const&, swift::Evaluator&) + 29
15 swift-frontend           0x0000000107aa0607 llvm::Expected<swift::ExecuteSILPipelineRequest::OutputType> swift::Evaluator::getResultUncached<swift::ExecuteSILPipelineRequest>(swift::ExecuteSILPipelineRequest const&) + 375
16 swift-frontend           0x0000000107a965d2 swift::executePassPipelinePlan(swift::SILModule*, swift::SILPassPipelinePlan const&, bool, swift::irgen::IRGenModule*) + 82
17 swift-frontend           0x000000010767f5f6 swift::IRGenRequest::evaluate(swift::Evaluator&, swift::IRGenDescriptor) const + 1846
18 swift-frontend           0x00000001076b4ced swift::GeneratedModule swift::SimpleRequest<swift::IRGenRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)9>::callDerived<0ul>(swift::Evaluator&, std::__1::integer_sequence<unsigned long, 0ul>) const + 157
19 swift-frontend           0x00000001076b4c0e swift::SimpleRequest<swift::IRGenRequest, swift::GeneratedModule (swift::IRGenDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::IRGenRequest const&, swift::Evaluator&) + 14
20 swift-frontend           0x0000000107689479 llvm::Expected<swift::IRGenRequest::OutputType> swift::Evaluator::getResultUncached<swift::IRGenRequest>(swift::IRGenRequest const&) + 345
21 swift-frontend           0x00000001076820fe llvm::Expected<swift::IRGenRequest::OutputType> swift::Evaluator::operator()<swift::IRGenRequest, (void*)0>(swift::IRGenRequest const&) + 110
22 swift-frontend           0x00000001076822a9 swift::performIRGeneration(swift::FileUnit*, swift::IRGenOptions const&, swift::TBDGenOptions const&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::StringRef, swift::PrimarySpecificPaths const&, llvm::StringRef, llvm::GlobalVariable**) + 313
23 swift-frontend           0x00000001073ca92e performCompileStepsPostSILGen(swift::CompilerInstance&, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule> >, llvm::PointerUnion<swift::ModuleDecl*, swift::SourceFile*>, swift::PrimarySpecificPaths const&, int&, swift::FrontendObserver*) + 2526
24 swift-frontend           0x00000001073c9c0e performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 350
25 swift-frontend           0x00000001073c1f9b swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 4827
26 swift-frontend           0x0000000107358862 main + 866
27 libdyld.dylib            0x00007fff7287bcc9 start + 1
28 libdyld.dylib            0x0000000000000055 start + 18446603338594665357
@typesanitizer
Copy link

Can you share anything about the source code? If you can share the source privately, you could submit a report through feedbackassistant.apple.com.

@swift-ci
Copy link
Collaborator Author

Comment by Bartosz Polaczyk (JIRA)

Hi! The file that exposes that fails this assert is auto-generated and contains a lot of sensitive data. I tried to quickly identify the critical part of if, without success. I will try to find some time to isolate the issue, but that may take a while.

@typesanitizer
Copy link

@swift-ci create

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

No branches or pull requests

2 participants