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

[cxx-interop] SIL verifier crash in Unmanaged.passUnretained() on SWIFT_UNSAFE_REFERENCE type #80065

Open
ADKaster opened this issue Mar 17, 2025 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software SIL

Comments

@ADKaster
Copy link
Contributor

Description

I have a SWIFT_UNSAFE_REFERENCE type that I implemented an equality operator for via pointer comparison with Unmanaged.passUnretained( ... ).toOpaque().

Reproduction

@_exported import CoreCxx

extension Core.EventLoop: Equatable {
    func deferred_invoke(_ task: @escaping () -> Void) {
        Core.deferred_invoke_block(self, task)
    }

    public static func == (lhs: Core.EventLoop, rhs: Core.EventLoop) -> Bool {
        Unmanaged.passUnretained(lhs).toOpaque() == Unmanaged.passUnretained(rhs).toOpaque()
    }
}

Stack dump

[42/47] Building Swift Module 'Core' with 1 source
FAILED: swift/Core.swiftmodule Lagom/Libraries/LibCore/CMakeFiles/LibCore.dir/EventLoopExecutor.swift.o
/home/andrew/.local/bin/swiftc -j 32 -num-threads 32 -c -DENABLE_COMPILETIME_FORMAT_CHECK -DLIBCORE_USE_SWIFT -DLibCore_EXPORTS -D_FILE_OFFSET_BITS=64 -parse-as-library -emit-module -emit-module-path swift/Core.swiftmodule -module-name Core -module-link-name lagom-core -O -g -incremental -color-diagnostics -enable-experimental-feature Extern -Xcc -Wall -Xcc -Wextra -Xcc -fno-exceptions -Xcc -ffp-contract=off -Xcc -Wcast-qual -Xcc -Wformat=2 -Xcc -Wimplicit-fallthrough -Xcc -Wlogical-op -Xcc -Wmissing-declarations -Xcc -Wmissing-field-initializers -Xcc -Wsuggest-override -Xcc -Wno-invalid-offsetof -Xcc -Wno-unknown-warning-option -Xcc -Wno-unused-command-line-argument -Xcc -Werror -Xcc -fconstexpr-steps=16777216 -Xcc -Wmissing-prototypes -Xcc -Wno-implicit-const-int-float-conversion -Xcc -Wno-user-defined-literals -Xcc -Wno-unqualified-std-cast-call -Xcc -fno-semantic-interposition -Xcc -fvisibility-inlines-hidden -Xcc -fstack-protector-strong -Xcc -fstrict-flex-arrays=2 -Xcc -Wno-maybe-uninitialized -Xcc -Wno-shorten-64-to-32 -Xcc -fsigned-char -Xcc -ggnu-pubnames -Xcc -fPIC -Xcc -O2 -Xcc -g1 -Xcc -Wno-overloaded-virtual -Xcc -Wno-unused-private-field -Xcc -ivfsoverlay/home/andrew/ladybird-org/ladybird-browser/Build/release/vfs_overlays/LibCore_vfs_overlay.yaml -Xcc -std=c++23 -cxx-interoperability-mode=default -Xcc -ivfsoverlay/home/andrew/ladybird-org/ladybird-browser/Build/release/vfs_overlays/AK_vfs_overlay.yaml -output-file-map Lagom/Libraries/LibCore/CMakeFiles/LibCore.dir/RelWithDebInfo/output-file-map.json -I /home/andrew/ladybird-org/ladybird-browser -I /home/andrew/ladybird-org/ladybird-browser/Services -I /home/andrew/ladybird-org/ladybird-browser/Libraries -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/Services -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/Libraries -I /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/include -I /home/andrew/ladybird-org/ladybird-browser/Meta/Lagom/../.. -I /home/andrew/ladybird-org/ladybird-browser/Meta/Lagom/../../Libraries -I /home/andrew/ladybird-org/ladybird-browser/Meta/Lagom/../../Services -I /home/andrew/ladybird-org/ladybird-browser/Build/release -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/Libraries/LibCore/include -I /home/andrew/ladybird-org/ladybird-browser/Build/release/swift -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/AK/include -I /home/andrew/ladybird-org/ladybird-browser/Build/release/vcpkg_installed/x64-linux-dynamic/include /home/andrew/ladybird-org/ladybird-browser/Libraries/LibCore/EventLoopExecutor.swift
warning: conditional compilation flags do not have values in Swift; they are either present or absent (rather than '_FILE_OFFSET_BITS=64')
error: compile command failed due to signal 6 (use -v to see invocation)
SIL verification failed: Operand of ref_to_unmanaged must have reference semantics: objectTy.isReferenceCounted(F.getModule())
Verifying instruction:
     %6 = begin_borrow [lexical] %0 : $Core.EventLoop // users: %7, %9
->   %7 = ref_to_unmanaged %6 : $Core.EventLoop to $@sil_unmanaged Core.EventLoop // user: %8
     %8 = struct $Unmanaged<Core.EventLoop> (%7 : $@sil_unmanaged Core.EventLoop) // user: %10
In function:
// static Core.EventLoop.== infix(_:_:)
// Isolation: unspecified
sil [ossa] @$sSo4CoreO9EventLoopVAAE2eeoiySbAD_ADtFZ : $@convention(method) (Core.EventLoop, Core.EventLoop, @thin Core.EventLoop.Type) -> Bool {
// %0 "lhs"                                       // users: %6, %3
// %1 "rhs"                                       // users: %12, %4
// %2 "self"                                      // user: %5
bb0(%0 : $Core.EventLoop, %1 : $Core.EventLoop, %2 : $@thin Core.EventLoop.Type):
  debug_value %0, let, name "lhs", argno 1        // id: %3
  debug_value %1, let, name "rhs", argno 2        // id: %4
  debug_value %2, let, name "self", argno 3       // id: %5
  %6 = begin_borrow [lexical] %0                  // users: %7, %9
  %7 = ref_to_unmanaged %6 to $@sil_unmanaged Core.EventLoop // user: %8
  %8 = struct $Unmanaged<Core.EventLoop> (%7)     // user: %10
  end_borrow %6                                   // id: %9
  %10 = unchecked_trivial_bit_cast %8 to $UnsafeMutableRawPointer // user: %11
  %11 = struct_extract %10, #UnsafeMutableRawPointer._rawValue // user: %18
  %12 = begin_borrow [lexical] %1                 // users: %13, %15
  %13 = ref_to_unmanaged %12 to $@sil_unmanaged Core.EventLoop // user: %14
  %14 = struct $Unmanaged<Core.EventLoop> (%13)   // user: %16
  end_borrow %12                                  // id: %15
  %16 = unchecked_trivial_bit_cast %14 to $UnsafeMutableRawPointer // user: %17
  %17 = struct_extract %16, #UnsafeMutableRawPointer._rawValue // user: %18
  %18 = builtin "cmp_eq_RawPointer"(%11, %17) : $Builtin.Int1 // user: %19
  %19 = struct $Bool (%18)                        // user: %20
  return %19                                      // id: %20
} // end sil function '$sSo4CoreO9EventLoopVAAE2eeoiySbAD_ADtFZ'

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend -frontend -c -primary-file /home/andrew/ladybird-org/ladybird-browser/Libraries/LibCore/EventLoopExecutor.swift -emit-reference-dependencies-path Lagom/Libraries/LibCore/CMakeFiles/LibCore.dir/EventLoopExecutor.swift.o.swiftdeps -target x86_64-unknown-linux-gnu -disable-objc-interop -cxx-interoperability-mode=default -I /home/andrew/ladybird-org/ladybird-browser -I /home/andrew/ladybird-org/ladybird-browser/Services -I /home/andrew/ladybird-org/ladybird-browser/Libraries -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/Services -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/Libraries -I /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/include -I /home/andrew/ladybird-org/ladybird-browser -I /home/andrew/ladybird-org/ladybird-browser/Libraries -I /home/andrew/ladybird-org/ladybird-browser/Services -I /home/andrew/ladybird-org/ladybird-browser/Build/release -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/Libraries/LibCore/include -I /home/andrew/ladybird-org/ladybird-browser/Build/release/swift -I /home/andrew/ladybird-org/ladybird-browser/Build/release/Lagom/AK/include -I /home/andrew/ladybird-org/ladybird-browser/Build/release/vcpkg_installed/x64-linux-dynamic/include -color-diagnostics -g -debug-info-format=dwarf -dwarf-version=4 -module-link-name lagom-core -O -D ENABLE_COMPILETIME_FORMAT_CHECK -D LIBCORE_USE_SWIFT -D LibCore_EXPORTS -D _FILE_OFFSET_BITS=64 -enable-experimental-feature Extern -empty-abi-descriptor -resource-dir /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/lib/swift -file-compilation-dir /home/andrew/ladybird-org/ladybird-browser/Build/release -Xcc -Wall -Xcc -Wextra -Xcc -fno-exceptions -Xcc -ffp-contract=off -Xcc -Wcast-qual -Xcc -Wformat=2 -Xcc -Wimplicit-fallthrough -Xcc -Wlogical-op -Xcc -Wmissing-declarations -Xcc -Wmissing-field-initializers -Xcc -Wsuggest-override -Xcc -Wno-invalid-offsetof -Xcc -Wno-unknown-warning-option -Xcc -Wno-unused-command-line-argument -Xcc -Werror -Xcc -fconstexpr-steps=16777216 -Xcc -Wmissing-prototypes -Xcc -Wno-implicit-const-int-float-conversion -Xcc -Wno-user-defined-literals -Xcc -Wno-unqualified-std-cast-call -Xcc -fno-semantic-interposition -Xcc -fvisibility-inlines-hidden -Xcc -fstack-protector-strong -Xcc -fstrict-flex-arrays=2 -Xcc -Wno-maybe-uninitialized -Xcc -Wno-shorten-64-to-32 -Xcc -fsigned-char -Xcc -ggnu-pubnames -Xcc -fPIC -Xcc -O2 -Xcc -g1 -Xcc -Wno-overloaded-virtual -Xcc -Wno-unused-private-field -Xcc -ivfsoverlay/home/andrew/ladybird-org/ladybird-browser/Build/release/vfs_overlays/LibCore_vfs_overlay.yaml -Xcc -std=c++23 -Xcc -ivfsoverlay/home/andrew/ladybird-org/ladybird-browser/Build/release/vfs_overlays/AK_vfs_overlay.yaml -no-auto-bridging-header-chaining -module-name Core -in-process-plugin-server-path /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/lib/swift/host/plugins -plugin-path /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/local/lib/swift/host/plugins -enable-default-cmo -parse-as-library -num-threads 32 -o Lagom/Libraries/LibCore/CMakeFiles/LibCore.dir/EventLoopExecutor.swift.o
1.      Swift version 6.2-dev (LLVM 162ee50b401fff2, Swift 57288d13c9f3c02)
2.      Compiling with effective version 5.10
3.      While verifying SIL function "@$sSo4CoreO9EventLoopVAAE2eeoiySbAD_ADtFZ".
 for '==(_:_:)' (at /home/andrew/ladybird-org/ladybird-browser/Libraries/LibCore/EventLoopExecutor.swift:15:12)
 #0 0x00005852ba486498 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x8b29498)
 #1 0x00005852ba483fbe llvm::sys::RunSignalHandlers() (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x8b26fbe)
 #2 0x00005852ba486b31 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007dbd1d645330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x00007dbd1d69eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x00007dbd1d69eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x00007dbd1d69eb2c pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x00007dbd1d64527e raise ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x00007dbd1d6288ff abort ./stdlib/abort.c:81:7
 #9 0x00005852b3c75d51 (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x2318d51)
#10 0x00005852b3ca9f24 (anonymous namespace)::SILVerifier::requireReferenceStorageCapableValue(swift::SILValue, llvm::Twine const&) SILVerifier.cpp:0:0
#11 0x00005852b3c86852 swift::SILVisitorBase<(anonymous namespace)::SILVerifier, void>::visitSILBasicBlock(swift::SILBasicBlock*) SILVerifier.cpp:0:0
#12 0x00005852b3c7f94f (anonymous namespace)::SILVerifier::visitSILBasicBlock(swift::SILBasicBlock*) SILVerifier.cpp:0:0
#13 0x00005852b3c7dd5b (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction*) SILVerifier.cpp:0:0
#14 0x00005852b3c75f5b swift::SILFunction::verify(swift::CalleeCache*, bool, bool, bool) const (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x2318f5b)
#15 0x00005852b3c79868 swift::SILModule::verify(swift::CalleeCache*, bool, bool) const (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x231c868)
#16 0x00005852b3c7971f swift::SILModule::verify(bool, bool) const (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x231c71f)
#17 0x00005852b2be3f84 swift::CompilerInstance::performSILProcessing(swift::SILModule*) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x1286f84)
#18 0x00005852b2881a97 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*) FrontendTool.cpp:0:0
#19 0x00005852b28809ea swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xf239ea)
#20 0x00005852b289229a withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) FrontendTool.cpp:0:0
#21 0x00005852b28838be performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) FrontendTool.cpp:0:0
#22 0x00005852b28829b5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xf259b5)
#23 0x00005852b261e12b swift::mainEntry(int, char const**) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xcc112b)
#24 0x00007dbd1d62a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#25 0x00007dbd1d62a28b call_init ./csu/../csu/libc-start.c:128:20
#26 0x00007dbd1d62a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#27 0x00005852b261d125 _start (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xcc0125)

Expected behavior

No crash, pointer comparison between SWIFT_UNSAFE_REFERENCE types should be allowed

Environment

This crashes on x86_64 Linux Swift version 6.2-dev (LLVM 162ee50b401fff2, Swift 57288d1) aka swiftly main-snapshot-2025-03-14

This same code does not crash on Xcode 16.3

Additional information

I'll update this issue with better repro steps once I clean up my branch. This reproduces for Ladybird.

@ADKaster ADKaster added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software triage needed This issue needs more specific labels labels Mar 17, 2025
@ADKaster
Copy link
Contributor Author

ADKaster commented Mar 17, 2025

Reduction:

Test.h:

#pragma once

#include <swift/bridging>

class S {
} SWIFT_UNSAFE_REFERENCE;

module.modulemap

module MyCxx {
   header "Test.h"
   requires cplusplus
   export *
}

main.swift

import MyCxx

extension MyCxx.S : Equatable {
   public static func == (lhs: MyCxx.S, rhs: MyCxx.S) -> Bool {
        Unmanaged.passUnretained(lhs).toOpaque() == Unmanaged.passUnretained(rhs).toOpaque()
   }
}

Test command (linux+swiftly): swiftc -I. -I$(swiftc -print-target-info | jq -r '.paths.runtimeResourcePath + "/../../include"') -cxx-interoperability-mode=default main.swift

On macOS it will probably work to just swiftc -I. -cxx-interoperability-mode=default main.swift

Backtrace:

error: compile command failed due to signal 6 (use -v to see invocation)
SIL verification failed: Operand of ref_to_unmanaged must have reference semantics: objectTy.isReferenceCounted(F.getModule())
Verifying instruction:
     %6 = begin_borrow [lexical] %0 : $S          // users: %7, %9
->   %7 = ref_to_unmanaged %6 : $S to $@sil_unmanaged S // user: %8
     %8 = struct $Unmanaged<S> (%7 : $@sil_unmanaged S) // user: %10
In function:
// static S.== infix(_:_:)
// Isolation: unspecified
sil [ossa] @$sSo1SV4mainE2eeoiySbAB_ABtFZ : $@convention(method) (S, S, @thin S.Type) -> Bool {
// %0 "lhs"                                       // users: %6, %3
// %1 "rhs"                                       // users: %12, %4
// %2 "self"                                      // user: %5
bb0(%0 : $S, %1 : $S, %2 : $@thin S.Type):
  debug_value %0, let, name "lhs", argno 1        // id: %3
  debug_value %1, let, name "rhs", argno 2        // id: %4
  debug_value %2, let, name "self", argno 3       // id: %5
  %6 = begin_borrow [lexical] %0                  // users: %7, %9
  %7 = ref_to_unmanaged %6 to $@sil_unmanaged S   // user: %8
  %8 = struct $Unmanaged<S> (%7)                  // user: %10
  end_borrow %6                                   // id: %9
  %10 = unchecked_trivial_bit_cast %8 to $UnsafeMutableRawPointer // user: %11
  %11 = struct_extract %10, #UnsafeMutableRawPointer._rawValue // user: %18
  %12 = begin_borrow [lexical] %1                 // users: %13, %15
  %13 = ref_to_unmanaged %12 to $@sil_unmanaged S // user: %14
  %14 = struct $Unmanaged<S> (%13)                // user: %16
  end_borrow %12                                  // id: %15
  %16 = unchecked_trivial_bit_cast %14 to $UnsafeMutableRawPointer // user: %17
  %17 = struct_extract %16, #UnsafeMutableRawPointer._rawValue // user: %18
  %18 = builtin "cmp_eq_RawPointer"(%11, %17) : $Builtin.Int1 // user: %19
  %19 = struct $Bool (%18)                        // user: %20
  return %19                                      // id: %20
} // end sil function '$sSo1SV4mainE2eeoiySbAB_ABtFZ'

Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend -frontend -c -primary-file main.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -cxx-interoperability-mode=default -I . -color-diagnostics -empty-abi-descriptor -resource-dir /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/lib/swift -Xcc -I/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/include -no-auto-bridging-header-chaining -module-name main -in-process-plugin-server-path /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/lib/swift/host/libSwiftInProcPluginServer.so -plugin-path /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/lib/swift/host/plugins -plugin-path /home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/local/lib/swift/host/plugins -parse-as-library -o /tmp/TemporaryDirectory.eunViy/main-1.o
1.      Swift version 6.2-dev (LLVM 162ee50b401fff2, Swift 57288d13c9f3c02)
2.      Compiling with effective version 5.10
3.      While verifying SIL function "@$sSo1SV4mainE2eeoiySbAB_ABtFZ".
 for '==(_:_:)' (at main.swift:4:11)
 #0 0x00005f144b7bb498 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x8b29498)
 #1 0x00005f144b7b8fbe llvm::sys::RunSignalHandlers() (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x8b26fbe)
 #2 0x00005f144b7bbb31 SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x0000794ebf645330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x0000794ebf69eb2c __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000794ebf69eb2c __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x0000794ebf69eb2c pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x0000794ebf64527e raise ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x0000794ebf6288ff abort ./stdlib/abort.c:81:7
 #9 0x00005f1444faad51 (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x2318d51)
#10 0x00005f1444fdef24 (anonymous namespace)::SILVerifier::requireReferenceStorageCapableValue(swift::SILValue, llvm::Twine const&) SILVerifier.cpp:0:0
#11 0x00005f1444fbb852 swift::SILVisitorBase<(anonymous namespace)::SILVerifier, void>::visitSILBasicBlock(swift::SILBasicBlock*) SILVerifier.cpp:0:0
#12 0x00005f1444fb494f (anonymous namespace)::SILVerifier::visitSILBasicBlock(swift::SILBasicBlock*) SILVerifier.cpp:0:0
#13 0x00005f1444fb2d5b (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction*) SILVerifier.cpp:0:0
#14 0x00005f1444faaf5b swift::SILFunction::verify(swift::CalleeCache*, bool, bool, bool) const (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x2318f5b)
#15 0x00005f1444fae868 swift::SILModule::verify(swift::CalleeCache*, bool, bool) const (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x231c868)
#16 0x00005f1444fae71f swift::SILModule::verify(bool, bool) const (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x231c71f)
#17 0x00005f1443f18f84 swift::CompilerInstance::performSILProcessing(swift::SILModule*) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0x1286f84)
#18 0x00005f1443bb6a97 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*) FrontendTool.cpp:0:0
#19 0x00005f1443bb59ea swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xf239ea)
#20 0x00005f1443bc729a withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) FrontendTool.cpp:0:0
#21 0x00005f1443bb88be performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) FrontendTool.cpp:0:0
#22 0x00005f1443bb79b5 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xf259b5)
#23 0x00005f144395312b swift::mainEntry(int, char const**) (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xcc112b)
#24 0x0000794ebf62a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#25 0x0000794ebf62a28b call_init ./csu/../csu/libc-start.c:128:20
#26 0x0000794ebf62a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#27 0x00005f1443952125 _start (/home/andrew/.local/share/swiftly/toolchains/main-snapshot-2025-03-14/usr/bin/swift-frontend+0xcc0125)

@glessard glessard added SIL and removed triage needed This issue needs more specific labels labels Mar 18, 2025
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. crash Bug: A crash, i.e., an abnormal termination of software SIL
Projects
None yet
Development

No branches or pull requests

2 participants