Skip to content

crash: Non trivial values, non address values, and non guaranteed function args must have at least one lifetime ending use?! #74595

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

Open
tayloraswift opened this issue Jun 20, 2024 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler itself crash Bug: A crash, i.e., an abnormal termination of software move-only Feature → type declarations: Move-only type declarations ownership Feature: Ownership modifiers and semantics SIL SILOptimizer Area → compiler: SIL optimization passes

Comments

@tayloraswift
Copy link
Member

Description

this errors with “this is a compiler bug” on 5.10, and crashes on main.

Reproduction

actor A
{
    nonisolated
    let x:Int

    init()
    {
        self.x = 0
    }
}
struct AWrapper:~Copyable
{
    let a:A
    var x:Int { self.a.x }
}

Stack dump

Begin Error in Function: '$s4main8AWrapperV1xSivg'
Non trivial values, non address values, and non guaranteed function args must have at least one lifetime ending use?!
Value:   %2 = begin_borrow %0 : $AWrapper
                // user: %3
End Error in Function: '$s4main8AWrapperV1xSivg'
Found ownership error?!
triggering standard assertion failure routine
UNREACHABLE executed at /home/build-user/swift/lib/SIL/Verifier/LinearLifetimeCheckerPrivate.h:211!
Stack dump:
0.      Program arguments: /usr/bin/swift-frontend -frontend -interpret - -disable-objc-interop -color-diagnostics -enable-bare-slash-regex -empty-abi-descriptor -Xcc -working-directory -Xcc /app -resource-dir /usr/lib/swift -module-name main -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins
1.      Swift version 6.0-dev (LLVM 57177aa1b91540b, Swift 8be62863326595c)
2.      Compiling with effective version 5.10
3.      While verifying SIL function "@$s4main8AWrapperV1xSivg".
 for getter for x (at <stdin>:14: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 0x000056795151b5a7
1  swift-frontend 0x00005679515192fe
2  swift-frontend 0x000056795151bc1a
3  libc.so.6      0x00007074e4f3f520
4  libc.so.6      0x00007074e4f939fc pthread_kill + 300
5  libc.so.6      0x00007074e4f3f476 raise + 22
6  libc.so.6      0x00007074e4f257f3 abort + 211
7  swift-frontend 0x0000567951470c6f
8  swift-frontend 0x000056794ba676ee
9  swift-frontend 0x000056794ba6baba
10 swift-frontend 0x000056794ba69df2
11 swift-frontend 0x000056794ba69a41
12 swift-frontend 0x000056794ba6c1cc
13 swift-frontend 0x000056794ba6c049
14 swift-frontend 0x000056794ba97dae
15 swift-frontend 0x000056794ba9b593
16 swift-frontend 0x000056794ba80261
17 swift-frontend 0x000056794ba77770
18 swift-frontend 0x000056794ba75cbb
19 swift-frontend 0x000056794ba6dd0f
20 swift-frontend 0x000056794ba719a8
21 swift-frontend 0x000056794ba71861
22 swift-frontend 0x000056794aa91922
23 swift-frontend 0x000056794a7637e3
24 swift-frontend 0x000056794a7629ea
25 swift-frontend 0x000056794a779605
26 swift-frontend 0x000056794a766717
27 swift-frontend 0x000056794a764a9c
28 swift-frontend 0x000056794a514e6e
29 libc.so.6      0x00007074e4f26d90
30 libc.so.6      0x00007074e4f26e40 __libc_start_main + 128
31 swift-frontend 0x000056794a513f15
timeout: the monitored command dumped core
Aborted

Expected behavior

it should not crash

Environment

Swift version 6.0-dev (LLVM 57177aa1b91540b, Swift 8be6286)
Target: x86_64-unknown-linux-gnu

Additional information

No response

@tayloraswift tayloraswift 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 Jun 20, 2024
@hamishknight hamishknight added compiler The Swift compiler itself SILOptimizer Area → compiler: SIL optimization passes SIL move-only Feature → type declarations: Move-only type declarations and removed triage needed This issue needs more specific labels labels Jun 24, 2024
@meg-gupta meg-gupta added the ownership Feature: Ownership modifiers and semantics label Jun 26, 2024
@Rajveer100
Copy link
Contributor

@tayloraswift
Looks like this isn't an issue anymore on main. Currently on 7bf2994 it returns expected SIL:

Details
sil_stage canonical

import Builtin
import Swift
import SwiftShims

actor A {
  @_hasStorage nonisolated final let x: Int { get }
  init()
  @objc deinit
  @available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *)
  @_semantics("defaultActor") nonisolated final var unownedExecutor: UnownedSerialExecutor {
    get
  }
}

struct AWrapper : ~Copyable {
  @_hasStorage let a: A { get }
  var x: Int { get }
  init(a: A)
}

// main
// Isolation: unspecified
sil @main : $@convention(c) (Int32, UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>) -> Int32 {
bb0(%0 : $Int32, %1 : $UnsafeMutablePointer<Optional<UnsafeMutablePointer<Int8>>>):
  %2 = integer_literal $Builtin.Int32, 0          // user: %3
  %3 = struct $Int32 (%2)                         // user: %4
  return %3                                       // id: %4
} // end sil function 'main'

// A.x.getter
// Isolation: nonisolated
sil hidden [transparent] @$s4main1AC1xSivg : $@convention(method) (@guaranteed A) -> Int {
// %0 "self"                                      // users: %2, %1
bb0(%0 : $A):
  debug_value %0, let, name "self", argno 1       // id: %1
  %2 = ref_element_addr [immutable] %0, #A.x      // user: %3
  %3 = load %2                                    // user: %4
  return %3                                       // id: %4
} // end sil function '$s4main1AC1xSivg'

// A.__allocating_init()
// Isolation: nonisolated
sil hidden [exact_self_class] @$s4main1ACACycfC : $@convention(method) (@thick A.Type) -> @owned A {
// %0 "$metatype"
bb0(%0 : $@thick A.Type):
  %1 = alloc_ref $A                               // user: %3
  // function_ref A.init()
  %2 = function_ref @$s4main1ACACycfc : $@convention(method) (@owned A) -> @owned A // user: %3
  %3 = apply %2(%1) : $@convention(method) (@owned A) -> @owned A // user: %4
  return %3                                       // id: %4
} // end sil function '$s4main1ACACycfC'

// A.init()
// Isolation: nonisolated
sil hidden @$s4main1ACACycfc : $@convention(method) (@owned A) -> @owned A {
// %0 "self"                                      // users: %5, %7, %2, %1
bb0(%0 : $A):
  debug_value %0, let, name "self", argno 1       // id: %1
  %2 = builtin "initializeDefaultActor"(%0) : $()
  %3 = integer_literal $Builtin.Int64, 0          // user: %4
  %4 = struct $Int (%3)                           // user: %6
  %5 = ref_element_addr %0, #A.x                  // user: %6
  store %4 to %5                                  // id: %6
  %7 = end_init_let_ref %0                        // user: %8
  return %7                                       // id: %8
} // end sil function '$s4main1ACACycfc'

// Int.init(_builtinIntegerLiteral:)
// Isolation: unspecified
sil public_external [transparent] @$sSi22_builtinIntegerLiteralSiBI_tcfC : $@convention(method) (Builtin.IntLiteral, @thin Int.Type) -> Int {
// %0                                             // user: %2
bb0(%0 : $Builtin.IntLiteral, %1 : $@thin Int.Type):
  %2 = builtin "s_to_s_checked_trunc_IntLiteral_Int64"(%0) : $(Builtin.Int64, Builtin.Int1) // user: %3
  %3 = tuple_extract %2, 0                        // user: %4
  %4 = struct $Int (%3)                           // user: %5
  return %4                                       // id: %5
} // end sil function '$sSi22_builtinIntegerLiteralSiBI_tcfC'

// A.deinit
// Isolation: unspecified
sil hidden @$s4main1ACfd : $@convention(method) (@guaranteed A) -> @owned Builtin.NativeObject {
// %0 "self"                                      // users: %3, %2, %1
bb0(%0 : $A):
  debug_value %0, let, name "self", argno 1       // id: %1
  %2 = builtin "destroyDefaultActor"(%0) : $()
  %3 = unchecked_ref_cast %0 to $Builtin.NativeObject // user: %4
  return %3                                       // id: %4
} // end sil function '$s4main1ACfd'

// A.__deallocating_deinit
// Isolation: nonisolated
sil hidden @$s4main1ACfD : $@convention(method) (@owned A) -> () {
// %0 "self"                                      // users: %3, %1
bb0(%0 : $A):
  debug_value %0, let, name "self", argno 1       // id: %1
  // function_ref A.deinit
  %2 = function_ref @$s4main1ACfd : $@convention(method) (@guaranteed A) -> @owned Builtin.NativeObject // user: %3
  %3 = apply %2(%0) : $@convention(method) (@guaranteed A) -> @owned Builtin.NativeObject // user: %4
  %4 = unchecked_ref_cast %3 to $A                // user: %5
  dealloc_ref %4                                  // id: %5
  %6 = tuple ()                                   // user: %7
  return %6                                       // id: %7
} // end sil function '$s4main1ACfD'

// A.unownedExecutor.getter
// Isolation: nonisolated
sil hidden [available 10.15] [_semantics "defaultActor"] @$s4main1AC15unownedExecutorScevg : $@convention(method) (@guaranteed A) -> UnownedSerialExecutor {
// %0 "self"                                      // users: %3, %1
bb0(%0 : $A):
  debug_value %0, let, name "self", argno 1       // id: %1
  %2 = metatype $@thin UnownedSerialExecutor.Type // user: %5
  %3 = builtin "buildDefaultActorExecutorRef"<A>(%0) : $Builtin.Executor // user: %5
  // function_ref UnownedSerialExecutor.init(_:)
  %4 = function_ref @$sSceySceBecfC : $@convention(method) (Builtin.Executor, @thin UnownedSerialExecutor.Type) -> UnownedSerialExecutor // user: %5
  %5 = apply %4(%3, %2) : $@convention(method) (Builtin.Executor, @thin UnownedSerialExecutor.Type) -> UnownedSerialExecutor // user: %6
  return %5                                       // id: %6
} // end sil function '$s4main1AC15unownedExecutorScevg'

// protocol witness for Actor.unownedExecutor.getter in conformance A
sil private [transparent] [thunk] @$s4main1ACScAAAScA15unownedExecutorScevgTW : $@convention(witness_method: Actor) (@guaranteed A) -> UnownedSerialExecutor {
// %0                                             // user: %2
bb0(%0 : $A):
  // function_ref A.unownedExecutor.getter
  %1 = function_ref @$s4main1AC15unownedExecutorScevg : $@convention(method) (@guaranteed A) -> UnownedSerialExecutor // user: %2
  %2 = apply %1(%0) : $@convention(method) (@guaranteed A) -> UnownedSerialExecutor // user: %3
  return %2                                       // id: %3
} // end sil function '$s4main1ACScAAAScA15unownedExecutorScevgTW'

// AWrapper.a.getter
// Isolation: unspecified
sil hidden [transparent] @$s4main8AWrapperV1aAA1ACvg : $@convention(method) (@guaranteed AWrapper) -> @owned A {
// %0 "self"                                      // users: %2, %1
bb0(%0 : $AWrapper):
  debug_value %0, let, name "self", argno 1       // id: %1
  %2 = struct_extract %0, #AWrapper.a             // users: %4, %3
  strong_retain %2                                // id: %3
  return %2                                       // id: %4
} // end sil function '$s4main8AWrapperV1aAA1ACvg'

// AWrapper.x.getter
// Isolation: unspecified
sil hidden @$s4main8AWrapperV1xSivg : $@convention(method) (@guaranteed AWrapper) -> Int {
// %0 "self"                                      // users: %2, %1
bb0(%0 : $AWrapper):
  debug_value %0, let, name "self", argno 1       // id: %1
  %2 = struct_extract %0, #AWrapper.a             // user: %3
  %3 = ref_element_addr [immutable] %2, #A.x      // user: %4
  %4 = load %3                                    // user: %5
  return %4                                       // id: %5
} // end sil function '$s4main8AWrapperV1xSivg'

// UnownedSerialExecutor.init(_:)
// Isolation: unspecified
sil [available 12.0.0] @$sSceySceBecfC : $@convention(method) (Builtin.Executor, @thin UnownedSerialExecutor.Type) -> UnownedSerialExecutor

sil_vtable A {
  #A.init!allocator: (A.Type) -> () -> A : @$s4main1ACACycfC	// A.__allocating_init()
  #A.deinit!deallocator: @$s4main1ACfD	// A.__deallocating_deinit
}

sil_witness_table hidden A: Actor module main {
  method #Actor.unownedExecutor!getter: <Self where Self : Actor> (Self) -> () -> UnownedSerialExecutor : @$s4main1ACScAAAScA15unownedExecutorScevgTW	// protocol witness for Actor.unownedExecutor.getter in conformance A
}



// Mappings from '#fileID' to '#filePath':
//   'main/debug-sil-actor.swift' => 'debug-sil-actor.swift'


@STREGA
Copy link
Contributor

STREGA commented Jun 2, 2025

Getting this crash using the non-Xcode toolchain swift-6.1.2-RELEASE-osx.
Interestingly this crash does NOT happen on the Xcode 6.1.2 toolchain.

struct Triangle<CollisionAttributes: CollisionAttributesGroup>: ~Copyable {
    @usableFromInline
    internal var mesh: CollisionMesh
    @usableFromInline
    internal let indices: TriangleIndices
    
    @inlinable
    public var p1: Position3 {
        let baseIndex = self.indices.p1
        let x = self.mesh.components.positions[baseIndex]
        let y = self.mesh.components.positions[baseIndex + 1]
        let z = self.mesh.components.positions[baseIndex + 2]
        return Position3(x, y, z)
    }
    ...
}
error: emit-module command failed due to signal 6 (use -v to see invocation)
error: compile command failed due to signal 6 (use -v to see invocation)
Begin Error in Function: '$s8GameMath13CollisionMeshC8TriangleV2p1AA9Position3Vvg'
Non trivial values, non address values, and non guaranteed function args must have at least one lifetime ending use?!
Value:   %7 = begin_borrow %0 : $CollisionMesh.Triangle<CollisionAttributes> // user: %8

End Error in Function: '$s8GameMath13CollisionMeshC8TriangleV2p1AA9Position3Vvg'
Found ownership error?!
<unknown>:0: error: fatal error encountered during compilation; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
<unknown>:0: note: triggering standard assertion failure routine
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.      Program arguments: /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/2D Colliders/AxisAlignedBoundingBox2D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/2D Colliders/BoundingCircle2D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/2D Colliders/BoundingEllipsoid2D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/2D Colliders/Collider2D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/Line2D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/Ray2D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/2D Physics/Rect+Physics.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Circle.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Direction2.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Insets.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Position2.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Rect.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Size2.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Transform2.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/2D Types/Vector2.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types (New)/Vector3SIMD.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/AxisAlignedBoundingBox3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/BoundingEllipsoid3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/BoundingSphere3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/Collider3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/OrientedBoundingBox3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/Triangles/CollisionAttributes.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/Triangles/CollisionMesh.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/Triangles/CollisionTriangle.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/Triangles/MeshCollider.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/Line3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/Plane3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/Ray3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/ViewFrustum3D.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Direction3.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Matrix3x3.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Matrix4x4.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Position3.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Quaternion.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Size3.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/TextureCoordinate.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Transform3.swift" "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/Vector3.swift" /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/BitStream.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/CardinalDirection.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/Color.swift "/Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/Degrees & Radians.swift" /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/FastInverseSquareRoot.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/GameMath.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/Interpolation.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/PlatformSpecific/CoreGraphics.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/PlatformSpecific/Win32.swift /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/Vector4.swift -target arm64-apple-macosx14.0 -Xllvm -aarch64-use-tbi -enable-objc-interop -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -I /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/Modules -I /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/lib/swift/macosx/testing -I /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/ModuleCache -swift-version 5 -Onone -diagnostic-style=llvm -D SWIFT_PACKAGE -D DEBUG -D SIMD -enable-upcoming-feature MemberImportVisibility -enable-upcoming-feature InternalImportsByDefault -enable-upcoming-feature StrictConcurrency=complete -enable-upcoming-feature ExistentialAny -empty-abi-descriptor -plugin-path /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/lib/swift/host/plugins/testing -resource-dir /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /Users/strega/Documents/GitHub/GateEngine -Xcc -isysroot -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.5.sdk -Xcc -F -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -Xcc -F -Xcc /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/PrivateFrameworks -Xcc -fPIC -Xcc -g -module-name GameMath -package-name gateengine -in-process-plugin-server-path /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/lib/swift/host/libSwiftInProcPluginServer.dylib -plugin-path /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/lib/swift/host/plugins -plugin-path /Library/Developer/Toolchains/swift-6.1.2-RELEASE.xctoolchain/usr/local/lib/swift/host/plugins -target-sdk-version 15.5 -target-sdk-name macosx15.5 -external-plugin-path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -external-plugin-path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/local/lib/swift/host/plugins#/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/bin/swift-plugin-server -emit-module-doc-path /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/Modules/GameMath.swiftdoc -emit-module-source-info-path /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/Modules/GameMath.swiftsourceinfo -emit-objc-header-path /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/GameMath.build/GameMath-Swift.h -emit-dependencies-path /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/GameMath.build/GameMath.emit-module.d -parse-as-library -o /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/Modules/GameMath.swiftmodule -emit-abi-descriptor-path /Volumes/Scratch/Swift/DerivedData/GateEngine/build/arm64-apple-macosx/debug/Modules/GameMath.abi.json
1.      Apple Swift version 6.1.2 (swift-6.1.2-RELEASE)
2.      Compiling with effective version 5.10
3.      While verifying SIL function "@$s8GameMath13CollisionMeshC8TriangleV2p1AA9Position3Vvg".
 for getter for p1 (at /Users/strega/Documents/GitHub/GateEngine/Sources/GameMath/3D Types/3D Physics/3D Colliders/Triangles/CollisionMesh.swift:138:20)
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           0x000000010787b854 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 56
1  swift-frontend           0x0000000107879f80 llvm::sys::RunSignalHandlers() + 112
2  swift-frontend           0x000000010787be98 SignalHandler(int) + 292
3  libsystem_platform.dylib 0x0000000187cd8624 _sigtramp + 56
4  libsystem_pthread.dylib  0x0000000187c9e88c pthread_kill + 296
5  libsystem_c.dylib        0x0000000187ba7c60 abort + 124
6  swift-frontend           0x00000001027a92d8 swift::DiagnosticHelper::create(swift::CompilerInstance&, llvm::raw_pwrite_stream&, bool) + 0
7  swift-frontend           0x00000001077f97f8 llvm::report_fatal_error(llvm::Twine const&, bool) + 256
8  swift-frontend           0x00000001077f96f8 llvm::report_fatal_error(llvm::Twine const&, bool) + 0
9  swift-frontend           0x00000001033e4748 swift::LinearLifetimeChecker::ErrorBuilder::tryDumpErrorCounter() const + 0
10 swift-frontend           0x00000001033ebeb0 swift::SILValueOwnershipChecker::checkValueWithoutLifetimeEndingUses(llvm::ArrayRef<swift::Operand*>, llvm::ArrayRef<swift::Operand*>) + 696
11 swift-frontend           0x00000001033ea564 swift::SILValueOwnershipChecker::checkUses() + 260
12 swift-frontend           0x00000001033ea240 swift::SILValueOwnershipChecker::check() + 216
13 swift-frontend           0x00000001033ec3bc verifySILValueHelper(swift::SILFunction const*, swift::SILValue, swift::LinearLifetimeChecker::ErrorBuilder&, swift::DeadEndBlocks*, swift::GuaranteedPhiVerifier&) + 156
14 swift-frontend           0x00000001033ec290 swift::SILValue::verifyOwnership(swift::DeadEndBlocks*) const + 216
15 swift-frontend           0x000000010340e438 (anonymous namespace)::SILVerifier::checkValueBaseOwnership(swift::ValueBase*) + 164
16 swift-frontend           0x0000000103411520 (anonymous namespace)::SILVerifier::visitSILInstruction(swift::SILInstruction*) + 6624
17 swift-frontend           0x00000001033fe264 swift::SILVisitorBase<(anonymous namespace)::SILVerifier, void>::visitSILBasicBlock(swift::SILBasicBlock*) + 35792
18 swift-frontend           0x00000001033f55d4 (anonymous namespace)::SILVerifier::visitSILBasicBlock(swift::SILBasicBlock*) + 24
19 swift-frontend           0x00000001033f3f40 (anonymous namespace)::SILVerifier::visitSILFunction(swift::SILFunction*) + 10204
20 swift-frontend           0x00000001033ee488 swift::SILFunction::verify(swift::CalleeCache*, bool, bool, bool) const + 224
21 swift-frontend           0x00000001033f11a8 swift::SILModule::verify(swift::CalleeCache*, bool, bool) const + 192
22 swift-frontend           0x00000001033f1080 swift::SILModule::verify(bool, bool) const + 140
23 swift-frontend           0x00000001027c075c swift::CompilerInstance::performSILProcessing(swift::SILModule*) + 148
24 swift-frontend           0x000000010258d16c 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*) + 820
25 swift-frontend           0x000000010258cb58 swift::performCompileStepsPostSema(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 1328
26 swift-frontend           0x0000000102598910 withSemanticAnalysis(swift::CompilerInstance&, swift::FrontendObserver*, llvm::function_ref<bool (swift::CompilerInstance&)>, bool) + 164
27 swift-frontend           0x000000010258e50c performCompile(swift::CompilerInstance&, int&, swift::FrontendObserver*) + 716
28 swift-frontend           0x000000010258dd28 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 2228
29 swift-frontend           0x00000001023716b0 swift::mainEntry(int, char const**) + 3064
30 dyld                     0x00000001878feb98 start + 6076
error: fatalError

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. compiler The Swift compiler itself crash Bug: A crash, i.e., an abnormal termination of software move-only Feature → type declarations: Move-only type declarations ownership Feature: Ownership modifiers and semantics SIL SILOptimizer Area → compiler: SIL optimization passes
Projects
None yet
Development

No branches or pull requests

5 participants