-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Description
@Catfish-Man - debug version compiles but not in release mode, after merge of #208
error: compile command failed due to signal 6 (use -v to see invocation)
SIL memory lifetime failure in @$s13SystemPackage6IORingV10queueDepth5flagsACs6UInt32V_AC10SetupFlagsVtAA5ErrnoVYKcfC: memory is not initialized, but should be
memory location: %195 = struct_element_addr %3 : $*IORing, #IORing.submissionRing // users: %214, %196
at instruction: %196 = load [take] %195 : $*SQRing // user: %197
in function:
// IORing.init(queueDepth:flags:)
// Isolation: unspecified
sil [ossa] @$s13SystemPackage6IORingV10queueDepth5flagsACs6UInt32V_AC10SetupFlagsVtAA5ErrnoVYKcfC : $@convention(method) (UInt32, IORing.SetupFlags, @thin IORing.Type) -> (@owned IORing, @error Errno) {
[global: read,write,copy,destroy,allocate,deinit_barrier]
// %0 "queueDepth" // users: %20, %4
// %1 "flags" // users: %20, %5
// %2 "$metatype"
bb0(%0 : $UInt32, %1 : $IORing.SetupFlags, %2 : $@thin IORing.Type):
%3 = alloc_stack [lexical] [var_decl] $IORing, var, name "self", type $IORing // users: %45, %47, %49, %51, %53, %55, %57, %65, %71, %261, %385, %387, %7, %11, %363, %195, %392, %393, %399, %389
debug_value %0, let, name "queueDepth", argno 1 // id: %4
debug_value %1, let, name "flags", argno 2 // id: %5
debug_value undef : $Errno, var, name "$error", argno 3 // id: %6
%7 = struct_element_addr %3, #IORing.submissionPolling // user: %10
%8 = integer_literal $Builtin.Int1, 0 // user: %9
%9 = struct $Bool (%8) // user: %10
store %9 to [trivial] %7 // id: %10
%11 = struct_element_addr %3, #IORing.features // users: %44, %17
%12 = integer_literal $Builtin.Int32, 0 // user: %13
%13 = struct $UInt32 (%12) // users: %213, %16, %15, %14
debug_value %13, let, name "rawValue", argno 1 // id: %14
debug_value %13, var, name "self", type $IORing.Features, expr op_fragment:#IORing.Features.rawValue // id: %15
%16 = struct $IORing.Features (%13) // user: %17
store %16 to [trivial] %11 // id: %17
debug_value undef : $*IORing, var, name "self" // id: %18
// function_ref setUpRing(queueDepth:flags:)
%19 = function_ref @$s13SystemPackage9setUpRing33_BDB3477CBA85358A785F40825BF4674DLL10queueDepth5flagsSo15io_uring_paramsV0P0_s5Int32V14ringDescriptorSvSg0R3PtrSi0R4SizeAL010submissioneT0Si0veU0AL010completioneT0Si0weU0Sv4sqests6UInt32V_AA6IORingV10SetupFlagsVtAA5ErrnoVYKF : $@convention(thin) (UInt32, IORing.SetupFlags) -> (io_uring_params, Int32, Optional<UnsafeMutableRawPointer>, Int, Optional<UnsafeMutableRawPointer>, Int, Optional<UnsafeMutableRawPointer>, Int, UnsafeMutableRawPointer, @error Errno) // user: %20
try_apply %19(%0, %1) : $@convention(thin) (UInt32, IORing.SetupFlags) -> (io_uring_params, Int32, Optional<UnsafeMutableRawPointer>, Int, Optional<UnsafeMutableRawPointer>, Int, Optional<UnsafeMutableRawPointer>, Int, UnsafeMutableRawPointer, @error Errno), normal bb1, error bb63 // id: %20
[...]
1. Swift version 6.2-dev (LLVM 0bbdf73817e84bd, Swift 5797130e90a66c5)
2. Compiling with effective version 5.10
3. While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for SystemPackage)
4. While running pass #211355 SILFunctionTransform "BoundsCheckOpts" on SILFunction "@$s13SystemPackage6IORingV10queueDepth5flagsACs6UInt32V_AC10SetupFlagsVtAA5ErrnoVYKcfC".
for 'init(queueDepth:flags:)' (at /home/actions/_work/ordo-sdk-internal/ordo-sdk-internal/.build/checkouts/swift-system/Sources/System/IORing/IORing.swift:368:12)
5. While verifying SIL function "@$s13SystemPackage6IORingV10queueDepth5flagsACs6UInt32V_AC10SetupFlagsVtAA5ErrnoVYKcfC".
for 'init(queueDepth:flags:)' (at /home/actions/_work/ordo-sdk-internal/ordo-sdk-internal/.build/checkouts/swift-system/Sources/System/IORing/IORing.swift:368:12)
#0 0x000055ff7aafb9f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/bin/swift-frontend+0x8c229f8)
#1 0x000055ff7aaf959e llvm::sys::RunSignalHandlers() (/usr/bin/swift-frontend+0x8c2059e)
#2 0x000055ff7aafc091 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
#3 0x00007fcfd1cfe330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
#4 0x00007fcfd1d57b2c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x9eb2c)
#5 0x00007fcfd1cfe27e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4527e)
#6 0x00007fcfd1ce18ff abort (/lib/x86_64-linux-gnu/libc.so.6+0x288ff)
#7 0x000055ff742ae573 (anonymous namespace)::MemoryLifetimeVerifier::reportError(llvm::Twine const&, int, swift::SILInstruction*) MemoryLifetimeVerifier.cpp:0:0
#8 0x000055ff742ad9be (anonymous namespace)::MemoryLifetimeVerifier::require(llvm::SmallBitVector const&, llvm::Twine const&, swift::SILInstruction*, bool) MemoryLifetimeVerifier.cpp:0:0
#9 0x000055ff742ade5a (anonymous namespace)::MemoryLifetimeVerifier::requireBitsSet(llvm::SmallBitVector const&, swift::SILValue, swift::SILInstruction*) MemoryLifetimeVerifier.cpp:0:0
#10 0x000055ff742abf27 (anonymous namespace)::MemoryLifetimeVerifier::checkBlock(swift::SILBasicBlock*, llvm::SmallBitVector&) MemoryLifetimeVerifier.cpp:0:0
#11 0x000055ff742aaac1 (anonymous namespace)::MemoryLifetimeVerifier::verify() MemoryLifetimeVerifier.cpp:0:0
#12 0x000055ff742a9b37 swift::SILFunction::verifyMemoryLifetime(swift::CalleeCache*) (/usr/bin/swift-frontend+0x23d0b37)
#13 0x000055ff74234e6e (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction*) SILVerifier.cpp:0:0
#14 0x000055ff7422c54e swift::SILFunction::verify(swift::CalleeCache*, bool, bool, bool) const (/usr/bin/swift-frontend+0x235354e)
#15 0x000055ff73c1cb3a (anonymous namespace)::BoundsCheckOpts::run() BoundsCheckOpts.cpp:0:0
#16 0x000055ff73808050 swift::SILPassManager::runPassOnFunction(unsigned int, swift::SILFunction*) (/usr/bin/swift-frontend+0x192f050)
#17 0x000055ff73809261 swift::SILPassManager::runFunctionPasses(unsigned int, unsigned int) (/usr/bin/swift-frontend+0x1930261)
The CI check only checks for debug build https://github.com/apple/swift-system/actions/runs/16231344215/job/45834631778?pr=208
This is with: Tag: swift-6.2-DEVELOPMENT-SNAPSHOT-2025-07-17-a
Metadata
Metadata
Assignees
Labels
No labels