-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
SILGenArea → compiler: The SIL generation stageArea → compiler: The SIL generation stageassertion failureBug → crash: An assertion failureBug → crash: An assertion failurebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwareexpressionsFeature: expressionsFeature: expressionskey pathsFeature: key paths (both native and Objective-C)Feature: key paths (both native and Objective-C)source compatibility suiteFlag: An issue that surfaced in the source compatibility suiteFlag: An issue that surfaced in the source compatibility suiteswift 6.0verifier
Description
Description
The penny-bot project is failing to build with the main branch on macOS. The error seen in the log is
error: compile command failed due to signal 6 (use -v to see invocation)
SIL verification failed: keypath value type should match value type of keypath pattern
any CodingKey
URICoderCodingKey
Verifying instruction:
-> %8 = keypath $KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey>, (root $URIValueFromNodeDecoder.CodingStackEntry; stored_property #URIValueFromNodeDecoder.CodingStackEntry.key : $URICoderCodingKey) // user: %9
%9 = move_value [lexical] [var_decl] %8 : $KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey> // users: %15, %11
In function:
// URIValueFromNodeDecoder.codingPath.getter
sil hidden [ossa] @$s14OpenAPIRuntime23URIValueFromNodeDecoderC10codingPathSays9CodingKey_pGvg : $@convention(method) (@guaranteed URIValueFromNodeDecoder) -> @owned Array<any CodingKey> {
// %0 "self" // users: %2, %1
bb0(%0 : @guaranteed $URIValueFromNodeDecoder):
debug_value %0 : $URIValueFromNodeDecoder, let, name "self", argno 1, implicit // id: %1
%2 = ref_element_addr %0 : $URIValueFromNodeDecoder, #URIValueFromNodeDecoder.codingStack // user: %3
%3 = begin_access [read] [dynamic] %2 : $*Array<URIValueFromNodeDecoder.CodingStackEntry> // users: %5, %4
%4 = load [copy] %3 : $*Array<URIValueFromNodeDecoder.CodingStackEntry> // user: %7
end_access %3 : $*Array<URIValueFromNodeDecoder.CodingStackEntry> // id: %5
%6 = alloc_stack $Array<URIValueFromNodeDecoder.CodingStackEntry> // users: %23, %22, %18, %7
store %4 to [init] %6 : $*Array<URIValueFromNodeDecoder.CodingStackEntry> // id: %7
%8 = keypath $KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey>, (root $URIValueFromNodeDecoder.CodingStackEntry; stored_property #URIValueFromNodeDecoder.CodingStackEntry.key : $URICoderCodingKey) // user: %9
%9 = move_value [lexical] [var_decl] %8 : $KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey> // users: %15, %11
// function_ref implicit closure #1 in URIValueFromNodeDecoder.codingPath.getter
%10 = function_ref @$s14OpenAPIRuntime23URIValueFromNodeDecoderC10codingPathSays9CodingKey_pGvgsAE_pAC0I10StackEntry33_BFEE7B52A740E8A5D915E2907E6B5D0CLLVcfu_ : $@convention(thin) @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0, @guaranteed KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey>) -> (@out τ_0_2, @error_indirect τ_0_1) for <URIValueFromNodeDecoder.CodingStackEntry, Never, any CodingKey> // user: %12
%11 = copy_value %9 : $KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey> // user: %12
%12 = partial_apply [callee_guaranteed] %10(%11) : $@convention(thin) @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0, @guaranteed KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey>) -> (@out τ_0_2, @error_indirect τ_0_1) for <URIValueFromNodeDecoder.CodingStackEntry, Never, any CodingKey> // users: %14, %13
%13 = convert_escape_to_noescape [not_guaranteed] %12 : $@callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error_indirect τ_0_1) for <URIValueFromNodeDecoder.CodingStackEntry, Never, any CodingKey> to $@noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error_indirect τ_0_1) for <URIValueFromNodeDecoder.CodingStackEntry, Never, any CodingKey> // users: %21, %18
destroy_value %12 : $@callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error_indirect τ_0_1) for <URIValueFromNodeDecoder.CodingStackEntry, Never, any CodingKey> // id: %14
destroy_value %9 : $KeyPath<URIValueFromNodeDecoder.CodingStackEntry, any CodingKey> // id: %15
// function_ref Collection.map<A, B>(_:)
%16 = function_ref @$sSlsE3mapySayqd__Gqd__7ElementQzqd_0_YKXEqd_0_YKs5ErrorRd_0_r0_lF : $@convention(method) <τ_0_0 where τ_0_0 : Collection><τ_1_0, τ_1_1 where τ_1_1 : Error> (@guaranteed @noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error_indirect τ_0_1) for <τ_0_0.Element, τ_1_1, τ_1_0>, @in_guaranteed τ_0_0) -> (@owned Array<τ_1_0>, @error_indirect τ_1_1) // user: %18
%17 = alloc_stack $Never // users: %20, %18
try_apply %16<[URIValueFromNodeDecoder.CodingStackEntry], any CodingKey, Never>(%17, %13, %6) : $@convention(method) <τ_0_0 where τ_0_0 : Collection><τ_1_0, τ_1_1 where τ_1_1 : Error> (@guaranteed @noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error_indirect τ_0_1) for <τ_0_0.Element, τ_1_1, τ_1_0>, @in_guaranteed τ_0_0) -> (@owned Array<τ_1_0>, @error_indirect τ_1_1), normal bb1, error bb2 // id: %18
// %19 // user: %24
bb1(%19 : @owned $Array<any CodingKey>): // Preds: bb0
dealloc_stack %17 : $*Never // id: %20
destroy_value %13 : $@noescape @callee_guaranteed @substituted <τ_0_0, τ_0_1, τ_0_2> (@in_guaranteed τ_0_0) -> (@out τ_0_2, @error_indirect τ_0_1) for <URIValueFromNodeDecoder.CodingStackEntry, Never, any CodingKey> // id: %21
destroy_addr %6 : $*Array<URIValueFromNodeDecoder.CodingStackEntry> // id: %22
dealloc_stack %6 : $*Array<URIValueFromNodeDecoder.CodingStackEntry> // id: %23
return %19 : $Array<any CodingKey> // id: %24
bb2: // Preds: bb0
unreachable // id: %25
} // end sil function '$s14OpenAPIRuntime23URIValueFromNodeDecoderC10codingPathSays9CodingKey_pGvg'
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0. Program arguments: <ommited>
1. Apple Swift version 5.11-dev (LLVM 69fa38fd6c00774, Swift 2fa1022a912a1c0)
2. Compiling with the current language version
3. While evaluating request ASTLoweringRequest(Lowering AST to SIL for module OpenAPIRuntime)
4. While silgen emitFunction SIL function "@$s14OpenAPIRuntime23URIValueFromNodeDecoderC10codingPathSays9CodingKey_pGvg".
for getter for codingPath (at /Users/ec2-user/jenkins/workspace/swift-main-source-compat-suite/swift-source-compat-suite/project_cache/penny-bot/.build/checkouts/swift-openapi-runtime/Sources/OpenAPIRuntime/URICoder/Decoding/URIValueFromNodeDecoder.swift:304:9)
5. While verifying SIL function "@$s14OpenAPIRuntime23URIValueFromNodeDecoderC10codingPathSays9CodingKey_pGvg".
for getter for codingPath (at /Users/ec2-user/jenkins/workspace/swift-main-source-compat-suite/swift-source-compat-suite/project_cache/penny-bot/.build/checkouts/swift-openapi-runtime/Sources/OpenAPIRuntime/URICoder/Decoding/URIValueFromNodeDecoder.swift:304:9)
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 0x000000010bc02f48 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 40
1 swift-frontend 0x000000010bc010e8 llvm::sys::RunSignalHandlers() + 248
2 swift-frontend 0x000000010bc035ae SignalHandler(int) + 270
3 libsystem_platform.dylib 0x00007ff809e205ed _sigtramp + 29
4 libsystem_platform.dylib 000000000000000000 _sigtramp + 18446603370415127088
5 libsystem_c.dylib 0x00007ff809d19b45 abort + 123
6 swift-frontend 0x00000001068e5748 (anonymous namespace)::SILVerifier::_require(bool, llvm::Twine const&, std::__1::function<void ()> const&) + 1288
7 swift-frontend 0x00000001068fb3aa swift::SILVisitorBase<(anonymous namespace)::SILVerifier, void>::visitSILBasicBlock(swift::SILBasicBlock*) + 70202
8 swift-frontend 0x00000001068ea0c2 (anonymous namespace)::SILVerifier::visitSILBasicBlock(swift::SILBasicBlock*) + 18
9 swift-frontend 0x00000001068e8aee (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction*) + 12030
10 swift-frontend 0x00000001068e1513 swift::SILFunction::verify(swift::CalleeCache*, bool, bool, bool) const + 227
11 swift-frontend 0x0000000105ed44c0 swift::Lowering::SILGenModule::postEmitFunction(swift::SILDeclRef, swift::SILFunction*) + 240
12 swift-frontend 0x0000000105ed3cf6 swift::Lowering::SILGenModule::emitFunctionDefinition(swift::SILDeclRef, swift::SILFunction*) + 6742
13 swift-frontend 0x0000000105ed4a64 swift::Lowering::SILGenModule::emitOrDelayFunction(swift::SILDeclRef) + 228
14 swift-frontend 0x0000000105ed227e swift::Lowering::SILGenModule::emitFunction(swift::FuncDecl*) + 190
15 swift-frontend 0x0000000105ffcdff SILGenExtension::visitFuncDecl(swift::FuncDecl*) + 143
16 swift-frontend 0x00000001070de0ca swift::AbstractStorageDecl::visitEmittedAccessors(llvm::function_ref<void (swift::AccessorDecl*)>) const + 90
17 swift-frontend 0x0000000105ed6bc2 swift::Lowering::SILGenModule::visitEmittedAccessors(swift::AbstractStorageDecl*, llvm::function_ref<void (swift::AccessorDecl*)>) + 50
18 swift-frontend 0x0000000105ffcc37 SILGenExtension::visitVarDecl(swift::VarDecl*) + 263
19 swift-frontend 0x0000000105ff89b7 SILGenExtension::emitExtension(swift::ExtensionDecl*) + 103
20 swift-frontend 0x0000000105ff8945 swift::Lowering::SILGenModule::visitExtensionDecl(swift::ExtensionDecl*) + 21
21 swift-frontend 0x0000000105ed7753 swift::ASTLoweringRequest::evaluate(swift::Evaluator&, swift::ASTLoweringDescriptor) const + 1315
22 swift-frontend 0x0000000105fe2643 swift::SimpleRequest<swift::ASTLoweringRequest, std::__1::unique_ptr<swift::SILModule, std::__1::default_delete<swift::SILModule>> (swift::ASTLoweringDescriptor), (swift::RequestFlags)9>::evaluateRequest(swift::ASTLoweringRequest const&, swift::Evaluator&) + 115
23 swift-frontend 0x0000000105edd84e llvm::Expected<swift::ASTLoweringRequest::OutputType> swift::Evaluator::getResultUncached<swift::ASTLoweringRequest>(swift::ASTLoweringRequest const&) + 382
24 swift-frontend 0x0000000105ed7f71 swift::performASTLowering(swift::ModuleDecl*, swift::Lowering::TypeConverter&, swift::SILOptions const&, swift::IRGenOptions const*) + 161
25 swift-frontend 0x000000010581f450 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 2272
26 swift-frontend 0x000000010583204f withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) + 143
27 swift-frontend 0x0000000105821ae3 performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 931
28 swift-frontend 0x0000000105820922 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3122
29 swift-frontend 0x0000000105641a12 swift::mainEntry(int, char const**) + 2530
30 dyld 0x00007ff809a9941f start + 1903
Reproduction
swift build --disable-sandbox --package-path penny-bot --verbose --configuration release -Xswiftc -swift-version -Xswiftc 5
Expected behavior
Expected to build
Environment
Apple Swift version 5.11-dev (LLVM 69fa38fd6c00774, Swift 2fa1022)
Target: x86_64-apple-macosx13.0
Additional information
https://ci.swift.org/view/Dashboard/job/swift-main-source-compat-suite/672
Metadata
Metadata
Assignees
Labels
SILGenArea → compiler: The SIL generation stageArea → compiler: The SIL generation stageassertion failureBug → crash: An assertion failureBug → crash: An assertion failurebugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of softwareBug: A crash, i.e., an abnormal termination of softwareexpressionsFeature: expressionsFeature: expressionskey pathsFeature: key paths (both native and Objective-C)Feature: key paths (both native and Objective-C)source compatibility suiteFlag: An issue that surfaced in the source compatibility suiteFlag: An issue that surfaced in the source compatibility suiteswift 6.0verifier