Skip to content

XCTest crashes with Swift Language Mode 6 on Ubuntu 24.04. #135

@YOCKOW

Description

@YOCKOW

Description

CSV.swift package can't be tested with Swift Language Mode 6 on Ubuntu 24.04.
(Possibly due to upstream's bug?)

Reproduction

git clone git@github.com:yaslab/CSV.swift
cd CSV.swift
swift test -Xswiftc -swift-version -Xswiftc 6

Result

Could not cast value of type '@Sendable (CSVTests.BinaryReaderTests) -> () -> ()' (0x7980708b5c58) to '(CSVTests.BinaryReaderTests) -> () -> ()' (0x7980708b5e48).

*** Signal 6: Backtracing from 0x79806ec9eb2c... done ***

*** Program crashed: Aborted at 0x000003e900386b50 ***

Thread 0 "CSV.swiftPackag" crashed:

 0               0x000079806ec9eb2c <unknown> in libc.so.6
 1 [ra]          0x000079806ec4527e <unknown> in libc.so.6
 2 [ra]          0x000079806ec288ff <unknown> in libc.so.6
 3 [ra]          0x0000798070633d3c swift::fatalErrorv(unsigned int, char const*, __va_list_tag*) + 139 in libswiftCore.so
 4 [ra]          0x0000798070633dbb swift::fatalError(unsigned int, char const*, ...) + 122 in libswiftCore.so
 5 [ra]          0x000079807062b0f7 swift::swift_dynamicCastFailure(void const*, char const*, void const*, char const*, char const*) + 70 in libswiftCore.so
 6 [ra]          0x000079807062b24b swift::swift_dynamicCastFailure(swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*, char const*) + 122 in libswiftCore.so
 7 [ra]          0x000079807062e9c7 swift_dynamicCast + 166 in libswiftCore.so
 8 [ra]          0x00007980704cebf2 _arrayForceCast<A, B>(_:) + 289 in libswiftCore.so
 9 [ra]          0x00005682a48bca29 __CSVTests__allTests() + 120 in CSV.swiftPackageTests.xctest at /home/yockow/Repositories/CSV.swift/.build/x86_64-unknown-linux-gnu/debug/CSV.swiftPackageDiscoveredTests.derived/CSVTests.swift:178:36
10 [ra]          0x00005682a48bd061 __allDiscoveredTests() + 48 in CSV.swiftPackageTests.xctest at /home/yockow/Repositories/CSV.swift/.build/x86_64-unknown-linux-gnu/debug/CSV.swiftPackageDiscoveredTests.derived/all-discovered-tests.swift:7:14
11 [ra]          0x00005682a48e7c29 static Runner.main() + 216 in CSV.swiftPackageTests.xctest at /home/yockow/Repositories/CSV.swift/.build/x86_64-unknown-linux-gnu/debug/CSV.swiftPackageTests.derived/runner.swift:543:22
12 [ra] [system] 0x00005682a48e7c49 static Runner.$main() + 8 in CSV.swiftPackageTests.xctest at //<compiler-generated>
13 [ra] [system] 0x00005682a48e7c69 main + 8 in CSV.swiftPackageTests.xctest at /home/yockow/Repositories/CSV.swift/.build/x86_64-unknown-linux-gnu/debug/CSV.swiftPackageTests.derived/runner.swift
14 [ra]          0x000079806ec2a1ca <unknown> in libc.so.6
15 [ra]          0x000079806ec2a28b <unknown> in libc.so.6


Registers:

rax 0x0000000000000000  0
rdx 0x0000000000386b50  3697488
rcx 0x000079806ec9eb2c  41 89 c6 41 f7 de 3d 00 f0 ff ff b8 00 00 00 00  A·ÆA÷Þ=·ðÿÿ¸····
rbx 0x0000000000000006  6
rsi 0x0000000000386b50  3697488
rdi 0x0000000000386b50  3697488
rbp 0x00007ffd9f226600  20 66 22 9f fd 7f 00 00 7e 52 c4 6e 80 79 00 00   f"·ý···~RÄn·y··
rsp 0x00007ffd9f2265c0  00 00 00 00 00 00 00 00 00 f0 c5 d0 52 3f 90 38  ·········ðÅÐR?·8
 r8 0x000079806ee03b20  a0 cc 83 e0 82 56 00 00 00 00 00 00 00 00 00 00   Ì·à·V··········
 r9 0x00000000000000b0  176
r10 0x0000000000000008  8
r11 0x0000000000000246  582
r12 0x0000000000000006  6
r13 0x00000000000000a4  164
r14 0x0000000000000016  22
r15 0x00007ffd9f2267f0  30 00 00 00 30 00 00 00 30 68 22 9f fd 7f 00 00  0···0···0h"·ý···
rip 0x000079806ec9eb2c  41 89 c6 41 f7 de 3d 00 f0 ff ff b8 00 00 00 00  A·ÆA÷Þ=·ðÿÿ¸····

rflags 0x0000000000000246  ZF PF

cs 0x0033  fs 0x0000  gs 0x0000


Images (19 omitted):

0x00005682a4824000–0x00005682a4992368 2b0e640af21afdd3605dd9eff7dbbe517eb932f3 CSV.swiftPackageTests.xctest /home/yockow/Repositories/CSV.swift/.build/x86_64-unknown-linux-gnu/debug/CSV.swiftPackageTests.xctest
0x000079806ec00000–0x000079806edafcb9 42c84c92e6f98126b3e2230ebfdead22c235b667 libc.so.6                    /usr/lib/x86_64-linux-gnu/libc.so.6
0x0000798070200000–0x000079807078f2d8 7bd479aa5e6f57e6772da70789dcdfa25d5e29b0 libswiftCore.so              /opt/Swift-6.1/lib/swift/linux/libswiftCore.so

Backtrace took 0.13s

error: Exited with unexpected signal code 6

Environment

  • OS: Ubuntu 24.04
  • Swift: Swift version 6.1 (swift-6.1-RELEASE) Target: x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions