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

error: Exited with signal code 11 - SIGSEGV: invalid address when decoding an object encoded by NSCoder on Ubuntu 22.04 #68296

Open
art-divin opened this issue Sep 2, 2023 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@art-divin
Copy link
Contributor

Description

When I run unit test in my port of Sourcery to Linux (Ubuntu 22.04),
and I use the following configuration:

  1. Swift version 5.9-dev (LLVM 8e2daa73d613753, Swift 7544686)
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian

I observe a crash error: Exited with signal code 11 happening with the following message:
signal SIGSEGV: invalid address (fault address: 0xffffff7ffeb0)

Steps to reproduce

  1. [email protected]:art-divin/Sourcery.git
  2. cd into the cloned repo
  3. git checkout 37763d173a84ee47068c12fc83108f7e6d4a10c5
  4. swift test

Expected behavior

Test should finish execution.

Screenshots
Screenshot 2023-09-02 at 11 46 57 PM

Environment

  • Swift compiler version info Swift version 5.9-dev (LLVM 8e2daa73d613753, Swift 7544686)
  • Xcode version info N/A
  • Deployment target: aarch64-unknown-linux-gnu

Additional context

  • Here is the CI integration which verifies the crash itself is not local and is reproducible with swift 5.8.1 as well.
  • crash does not happen on macOS
@art-divin art-divin added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Sep 2, 2023
@art-divin
Copy link
Contributor Author

Here is the crash report:

*** Program crashed: Bad pointer dereference at 0x0000ffffc5bfefe0 ***

Thread 0 "SourceryPackage" crashed:

    0               0x0000ffff8bec1d3c __swift::__runtime::llvm::hash_code __swift::__runtime::llvm::hash_combine<__swift::__runtime::llvm::hash_code, __swift::__runtime::llvm::StringRef>(__swift::__runtime::llvm::hash_code const&, __swift::__runtime::llvm::StringRef const&) + 28 in libswiftCore.so
    1 [ra]          0x0000ffff8bec1be0 std::pair<swift::HashMapElementWrapper<(anonymous namespace)::TupleCacheEntry>*, unsigned int> swift::ConcurrentReadableHashMap<swift::HashMapElementWrapper<(anonymous namespace)::TupleCacheEntry>, swift::Mutex>::find<(anonymous namespace)::TupleCacheEntry::Key>((anonymous namespace)::TupleCacheEntry::Key const&, swift::ConcurrentReadableHashMap<swift::HashMapElementWrapper<(anonymous namespace)::TupleCacheEntry>, swift::Mutex>::IndexStorage, unsigned long, swift::HashMapElementWrapper<(anonymous namespace)::TupleCacheEntry>*) + 111 in libswiftCore.so
    2 [ra]          0x0000ffff8beb0654 std::pair<(anonymous namespace)::TupleCacheEntry*, swift::MetadataResponse> swift::LockingConcurrentMap<(anonymous namespace)::TupleCacheEntry, (anonymous namespace)::TupleCacheStorage>::getOrInsert<(anonymous namespace)::TupleCacheEntry::Key, swift::MetadataRequest&, swift::TargetValueWitnessTable<swift::InProcess> const*&>((anonymous namespace)::TupleCacheEntry::Key, swift::MetadataRequest&, swift::TargetValueWitnessTable<swift::InProcess> const*&) + 271 in libswiftCore.so
    3 [ra]          0x0000ffff8beb0324 swift_getTupleTypeMetadata + 119 in libswiftCore.so
    4 [ra]          0x0000ffff8beb1338 swift_getTupleTypeMetadata2 + 27 in libswiftCore.so
    5 [ra]          0x0000ffff8bc9844c _dictionaryDownCastConditional<A, B, C, D>(_:) + 343 in libswiftCore.so
    6 [ra]          0x0000ffff8bc982c0 _swift_dictionaryDownCastConditionalIndirect + 83 in libswiftCore.so
    7 [ra]          0x0000ffff8bea0ba8 tryCastToDictionary(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 151 in libswiftCore.so
    8 [ra]          0x0000ffff8bea0024 tryCast(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 659 in libswiftCore.so
    9 [ra]          0x0000ffff8bea0248 tryCast(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 1207 in libswiftCore.so
   10 [ra]          0x0000ffff8be9fd24 swift_dynamicCast + 67 in libswiftCore.so
   11 [ra]          0x0000ffff8b437b0c NSKeyedUnarchiver._decodeObject(_:) + 1295 in libFoundation.so
   12 [ra]          0x0000ffff8b438cfc NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:withBlock:) + 283 in libFoundation.so
   13 [ra]          0x0000ffff8b438dac NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:) + 63 in libFoundation.so
   14 [ra] [thunk]  0x0000ffff8b40807c NSDictionary.__allocating_init(coder:) + 975 in libFoundation.so
   15 [ra] [thunk]  0x0000ffff8b40b440 protocol witness for NSCoding.init(coder:) in conformance NSDictionary + 23 in libFoundation.so
   16 [ra]          0x0000ffff8b438298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   17 [ra]          0x0000ffff8b43895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   18 [ra]          0x0000ffff8b439274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   19 [ra]          0x0000aaaae4df2810 NSCoder.maybeDecode<A>(forKey:) + 87 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   20 [ra]          0x0000aaaae4df2a54 NSCoder.decode<A>(forKey:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   21 [ra]          0x0000aaaae4d87834 Type.init(coder:) + 1679 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type.swift:588:67
   22 [ra]          0x0000aaaae4d6e6c4 Struct.init(coder:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift:90:19
   23 [ra] [thunk]  0x0000aaaae4d6e67c Struct.__allocating_init(coder:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift
   24 [ra] [thunk]  0x0000aaaae4df307c protocol witness for NSCoding.init(coder:) in conformance Type + 23 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/<compiler-generated>
   25 [ra]          0x0000ffff8b438298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   26 [ra]          0x0000ffff8b43895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   27 [ra]          0x0000ffff8b439274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   28 [ra]          0x0000aaaae4df2810 NSCoder.maybeDecode<A>(forKey:) + 87 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   29 [ra]          0x0000aaaae4df2a54 NSCoder.decode<A>(forKey:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   30 [ra]          0x0000aaaae4db8f64 Typealias.init(coder:) + 1379 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Typealias.swift:114:36
   31 [ra] [thunk]  0x0000aaaae4db89f0 Typealias.__allocating_init(coder:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Typealias.swift
   32 [ra] [thunk]  0x0000aaaae4df310c protocol witness for NSCoding.init(coder:) in conformance Typealias + 19 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/<compiler-generated>
   33 [ra]          0x0000ffff8b438298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   34 [ra]          0x0000ffff8b438cfc NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:withBlock:) + 283 in libFoundation.so
   35 [ra]          0x0000ffff8b438dac NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:) + 63 in libFoundation.so
   36 [ra] [thunk]  0x0000ffff8b40807c NSDictionary.__allocating_init(coder:) + 975 in libFoundation.so
   37 [ra] [thunk]  0x0000ffff8b40b440 protocol witness for NSCoding.init(coder:) in conformance NSDictionary + 23 in libFoundation.so
   38 [ra]          0x0000ffff8b438298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   39 [ra]          0x0000ffff8b43895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   40 [ra]          0x0000ffff8b439274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   41 [ra]          0x0000aaaae4df2810 NSCoder.maybeDecode<A>(forKey:) + 87 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   42 [ra]          0x0000aaaae4df2a54 NSCoder.decode<A>(forKey:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   43 [ra]          0x0000aaaae4d87834 Type.init(coder:) + 1679 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type.swift:588:67
   44 [ra]          0x0000aaaae4d6e6c4 Struct.init(coder:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift:90:19
   45 [ra] [thunk]  0x0000aaaae4d6e67c Struct.__allocating_init(coder:) + 55 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift
   46 [ra] [thunk]  0x0000aaaae4df307c protocol witness for NSCoding.init(coder:) in conformance Type + 23 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/<compiler-generated>
  ...
22337 [ra] [thunk]  0x0000ffff8adb82c0 partial apply for thunk for @escaping @callee_guaranteed (@in_guaranteed XCTestCase) -> (@out (), @error @owned Error) + 39 in libXCTest.so
22338 [ra]          0x0000ffff8adc3e6c XCTestCase.invokeTest() + 367 in libXCTest.so
22339 [ra]          0x0000ffff8adc3ae4 XCTestCase.perform(_:) + 159 in libXCTest.so
22340 [ra]          0x0000ffff8adc7ccc XCTest.run() + 163 in libXCTest.so
22341 [ra]          0x0000ffff8adc62b8 XCTestSuite.perform(_:) + 155 in libXCTest.so
22342 [ra]          0x0000ffff8adc7ccc XCTest.run() + 163 in libXCTest.so
22343 [ra]          0x0000ffff8adc62b8 XCTestSuite.perform(_:) + 155 in libXCTest.so
22344 [ra]          0x0000ffff8adc7ccc XCTest.run() + 163 in libXCTest.so
22345 [ra]          0x0000ffff8adc2db8 XCTMain(_:arguments:observers:) + 935 in libXCTest.so
22346 [ra]          0x0000ffff8adc2964 XCTMain(_:) + 111 in libXCTest.so
22347 [ra]          0x0000aaaae4a83ad8 QCKMain(_:configurations:testCases:) + 303 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/.build/checkouts/Quick/Sources/Quick/QuickMain.swift:28:5
22348 [ra]          0x0000aaaae4d27e9c static Main.main() + 267 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/LinuxMain.swift:10:9
22349 [ra] [system] 0x0000aaaae4d27f54 static Main.$main() + 11 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/<compiler-generated>
22350 [ra]          0x0000aaaae4d27f6c main + 11 in SourceryPackageTests.xctest at /home/tart/Documents/projects/Sourcery/LinuxMain.swift:8:14
22351 [ra]          0x0000ffff8a8773fc __libc_start_call_main + 107 in libc.so.6
22352 [ra]          0x0000ffff8a8774cc __libc_start_main@GLIBC_2.17 + 151 in libc.so.6


Registers:

 x0 0x0000ffffc5bff038  e8 06 0b 90 45 cc 6c b2 40 f2 bf c5 ff ff 00 00  è···EÌl²@ò¿Åÿÿ··
 x1 0x0000ffffc5bff028  dc 92 02 8c ff ff 00 00 0a 00 00 00 00 00 00 00  Ü···ÿÿ··········
 x2 0x756c61762079656b  8461244959901181291
 x3 0x74696e6900002065  8388357178204889189
 x4 0x0000000000000010  16
 x5 0x0000000080800000  2155872256
 x6 0x73686d67feff1f64  8316017005366812516
 x7 0x7f7f7f7f7f7f7f7f  9187201950435737471
 x8 0x0000ffff8c0fc118  01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ················
 x9 0xb26c33ba1bf4e868  12856707910661892200
x10 0xee900000fffe20c3  17190239781968027843
x11 0x9ddfea08eb382d69  11376068507788127593
x12 0x0000ffff8bff1aa8  00 02 00 00 00 00 00 00 88 bf 01 8c ff ff 00 00  ·········¿··ÿÿ··
x13 0x0000ffff8bff30c8  00 02 00 00 00 00 00 00 48 ed 01 8c ff ff 00 00  ········Hí··ÿÿ··
x14 0x0000000000000001  1
x15 0x0000ffff8bff30c8  00 02 00 00 00 00 00 00 48 ed 01 8c ff ff 00 00  ········Hí··ÿÿ··
x16 0x0000ffff8c000020  40 99 8e 8a ff ff 00 00 40 d6 8d 8a ff ff 00 00  @···ÿÿ··@Ö··ÿÿ··
x17 0x0000ffff8a8e9940  1f 20 03 d5 04 2c 40 92 9f 80 3f f1 28 07 00 54  · ·Õ·,@···?ñ(··T
x18 0x0000000000000000  0
x19 0x0000aaab0a1adac8  e8 cf 0f 8c ff ff 00 00 18 d1 0f 8c ff ff 00 00  èÏ··ÿÿ···Ñ··ÿÿ··
x20 0x000000000000003c  60
x21 0x0000ffffc5bff1b0  02 00 00 00 00 00 00 00 40 f3 bf c5 ff ff 00 00  ········@ó¿Åÿÿ··
x22 0x0000aaab0a1c25f1  18 00 13 1e 00 00 15 24 30 00 00 00 00 00 00 00  ·······$0·······
x23 0x0000ffff8c0292dc  6b 65 79 20 76 61 6c 75 65 20 00 00 69 6e 69 74  key value ··init
x24 0x0000ffff8bff1aa8  00 02 00 00 00 00 00 00 88 bf 01 8c ff ff 00 00  ·········¿··ÿÿ··
x25 0x0000aaab0a1d2140  28 89 1a 0a ab aa 00 00 03 00 00 00 f0 07 00 00  (···«ª······ð···
x26 0x0000000000000001  1
x27 0x0000ffff8bff30c8  00 02 00 00 00 00 00 00 48 ed 01 8c ff ff 00 00  ········Hí··ÿÿ··
x28 0x0000000000000200  512
 fp 0x0000ffffc5bff000  40 f0 bf c5 ff ff 00 00 e0 1b ec 8b ff ff 00 00  @ð¿Åÿÿ··à·ì·ÿÿ··
 lr 0x0000ffff8bec1be0  c9 06 40 f2 c8 f6 7e 92 8a 00 80 52 60 00 00 54  É·@òÈö~····R`··T
 sp 0x0000ffffc5bfef60  281473999433568
 pc 0x0000ffff8bec1d3c  ff 43 00 f9 d3 11 00 f0 e0 03 01 ad e0 03 02 ad  ÿC·ùÓ··ðà··­à··­


Images (54 omitted):

0x0000aaaae3f90000–0x0000aaaae82aa270 <no build ID>                            SourceryPackageTests.xctest /home/tart/Documents/projects/Sourcery/.build/aarch64-unknown-linux-gnu/debug/SourceryPackageTests.xctest
0x0000ffff8a850000–0x0000ffff8a9d8244 f37f3aa07c797e333fd106472898d361f71798f5 libc.so.6                   /usr/lib/aarch64-linux-gnu/libc.so.6
0x0000ffff8ad90000–0x0000ffff8ade8878 <no build ID>                            libXCTest.so                /home/tart/.local/share/swiftly/toolchains/5.9-snapshot-2023-08-29/usr/lib/swift/linux/libXCTest.so
0x0000ffff8afe0000–0x0000ffff8b6e0628 <no build ID>                            libFoundation.so            /home/tart/.local/share/swiftly/toolchains/5.9-snapshot-2023-08-29/usr/lib/swift/linux/libFoundation.so
0x0000ffff8bae0000–0x0000ffff8bfd3c88 <no build ID>                            libswiftCore.so             /home/tart/.local/share/swiftly/toolchains/5.9-snapshot-2023-08-29/usr/lib/swift/linux/libswiftCore.so

@art-divin
Copy link
Contributor Author

I have found another crash log, seems like it is the same issue; however, since I cannot be sure, please advise if I need to create a separate bug, since steps to reproduce were a little bit different.

💣 Program crashed: Bad pointer dereference at 0x0000ffffef965f70

Thread 0 "sourcery" crashed:

    0 0x0000ffffa51a1320 swift_getTupleTypeMetadata2 + 4 in libswiftCore.so
    1 Type.init(coder:) + 711 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:265:43

   263│ 
   264│     /// All annotations for this type
   265│     public var annotations: Annotations = [:]                                                                                              
      │                                           ▲
   266│ 
   267│     public var documentation: Documentation = []

    2 Struct.init(coder:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift:90:19

    88│         /// :nodoc:
    89│         required public init?(coder aDecoder: NSCoder) {
    90│             super.init(coder: aDecoder)                                                                                                    
      │                   ▲
    91│         }
    92│

    3 0x0000ffffa4608298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
    4 0x0000ffffa460895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
    5 0x0000ffffa4609274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
    6 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33

    33│ 
    34│     fileprivate func maybeDecode<E>(forKey: String) -> E? {
    35│         guard let object = self.decodeObject(forKey: forKey) else {                                                                        
      │                                 ▲
    36│             return nil
    37│         }

    7 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16

    29│ 
    30│     func decode<E>(forKey: String) -> E? {
    31│         return maybeDecode(forKey: forKey) as E?                                                                                           
      │                ▲
    32│     }
    33│

    8 Type.init(coder:) + 8887 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:682:36

   680│              }; self.containedType = containedType
   681│             self.parentName = aDecoder.decode(forKey: "parentName")
   682│             self.parent = aDecoder.decode(forKey: "parent")                                                                                
      │                                    ▲
   683│             self.supertype = aDecoder.decode(forKey: "supertype")
   684│             guard let attributes: AttributeList = aDecoder.decode(forKey: "attributes") else {

    9 Enum.init(coder:) + 1027 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Enum_Linux.swift:154:19

   152│             self.hasRawType = aDecoder.decode(forKey: "hasRawType")
   153│             self.rawType = aDecoder.decode(forKey: "rawType")
   154│             super.init(coder: aDecoder)                                                                                                    
      │                   ▲
   155│         }
   156│

   10 0x0000ffffa4608298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   11 0x0000ffffa4608cfc NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:withBlock:) + 283 in libFoundation.so
   12 0x0000ffffa4608dac NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:) + 63 in libFoundation.so
   13 0x0000ffffa4608298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   14 0x0000ffffa460895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   15 0x0000ffffa4609274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   16 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   17 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   18 Type.init(coder:) + 7899 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:669:57

   667│                 fatalError()
   668│              }; self.implements = implements
   669│             guard let containedTypes: [Type] = aDecoder.decode(forKey: "containedTypes") else {                                            
      │                                                         ▲
   670│                 withVaList(["containedTypes"]) { arguments in
   671│                     NSException.raise(NSExceptionName.parseErrorException, format: "Key '%@' not found.", arguments: arguments)

   19 Struct.init(coder:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift:90:19
   20 0x0000ffffa4608298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   21 0x0000ffffa460895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   22 0x0000ffffa4609274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   23 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   24 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   25 Type.init(coder:) + 8887 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:682:36
   26 Enum.init(coder:) + 1027 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Enum_Linux.swift:154:19
   27 0x0000ffffa4608298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   28 0x0000ffffa4608cfc NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:withBlock:) + 283 in libFoundation.so
   29 0x0000ffffa4608dac NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:) + 63 in libFoundation.so
   30 0x0000ffffa4608298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   31 0x0000ffffa460895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   32 0x0000ffffa4609274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   33 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   34 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
  ... 
17075 closure #4 in Sourcery.processFiles(_:usingTemplates:output:isDryRun:forceParse:parseDocumentation:baseIndentation:) + 635 in sourcery at /home/tart/Documents/projects/Sourcery/Sourcery/Sourcery.swift:93:35

    91│             switch source {
    92│             case let .sources(paths):
    93│                 result = try self.parse(from: paths.include, exclude: paths.exclude, forceParse: forceParse, parseDocumentation: parseDocumentation, modules: nil, requiresFileParserCopy: hasSwiftTemplates)
      │                                   ▲
    94│             case let .projects(projects):
    95│                 var paths: [Path] = []

17076 Sourcery.processFiles(_:usingTemplates:output:isDryRun:forceParse:parseDocumentation:baseIndentation:) + 1795 in sourcery at /home/tart/Documents/projects/Sourcery/Sourcery/Sourcery.swift:125:26

   123│         }
   124│ 
   125│         var result = try process(source)                                                                                                   
      │                          ▲
   126│ 
   127│         if isDryRun {

17077 closure #2 in closure #1 in runCLI() + 919 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:387:37

   385│                                         arguments: configuration.args)
   386│ 
   387│                 return try sourcery.processFiles(                                                                                          
      │                                     ▲
   388│                     configuration.source,
   389│                     usingTemplates: configuration.templates,

17078 0x0000ffffa5033224 Sequence.flatMap<A>(_:) + 535 in libswiftCore.so
17079 closure #1 in runCLI() + 1695 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:373:48

   371│             let start = Date().timeIntervalSince1970
   372│ 
   373│             let keepAlive = try configurations.flatMap { configuration -> [FolderWatcher.Local] in                                         
      │                                                ▲
   374│                 configuration.validate()
   375│

17080 closure #1 in command<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) + 6799 in sourcery at /home/tart/Documents/projects/Sourcery/.build/checkouts/Commander/Sources/Commander/Commands.swift:1023:9

  1021│     }
  1022│ 
  1023│     try closure(value0, value1, value2, value3, value4, value5, value6, value7, value8, value9, value10, value11, value12, value13, value14, value15, value16, value17, value18, value19)
      │         ▲
  1024│   }
  1025│ }

17081 AnonymousCommand.run(_:) + 79 in sourcery at /home/tart/Documents/projects/Sourcery/.build/checkouts/Commander/Sources/Commander/Command.swift:10:9

     8│ 
     9│   func run(_ parser:ArgumentParser) throws {
    10│     try closure(parser)                                                                                                                    
      │         ▲
    11│   }
    12│ }

17082 CommandType.run(_:) + 895 in sourcery at /home/tart/Documents/projects/Sourcery/.build/checkouts/Commander/Sources/Commander/CommandRunner.swift:24:11

    22│ 
    23│     do {
    24│       try run(parser)                                                                                                                      
      │           ▲
    25│     } catch let error as Help {
    26│       let help = error.reraise("$ \(executableName)")

17083 runCLI() + 4067 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:417:11

   415│             exit(.other)
   416│         }
   417│         }.run(Sourcery.version)                                                                                                            
      │           ▲
   418│ }
   419│

17084 SourceryExecutable_main + 11 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:420:1

   418│ }
   419│ 
   420│ runCLI()                                                                                                                                   
      │ ▲
   421│ #endif
   422│

17085 0x0000ffffa3ac73fc __libc_start_call_main + 107 in libc.so.6
17086 0x0000ffffa3ac74cc __libc_start_main@GLIBC_2.17 + 151 in libc.so.6

Segmentation fault (core dumped)

@art-divin
Copy link
Contributor Author

Here's another crash report I just got, I hope it'd help investigation.



*** Program crashed: Bad pointer dereference at 0x0000ffffc9166fc0 ***

Thread 0 "sourcery" crashed:

    0              0x0000ffffa3c0e2bc getCache(swift::TargetTypeContextDescriptor<swift::InProcess> const&) + 4 in libswiftCore.so
    1 [ra]         0x0000ffffa3bf1d88 __swift_instantiateCanonicalPrespecializedGenericMetadata + 35 in libswiftCore.so
    2 [ra]         0x0000ffffa39f8338 _dictionaryDownCastConditional<A, B, C, D>(_:) + 67 in libswiftCore.so
    3 [ra]         0x0000ffffa39f82c0 _swift_dictionaryDownCastConditionalIndirect + 83 in libswiftCore.so
    4 [ra]         0x0000ffffa3c00ba8 tryCastToDictionary(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 151 in libswiftCore.so
    5 [ra]         0x0000ffffa3c00024 tryCast(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 659 in libswiftCore.so
    6 [ra]         0x0000ffffa3c00248 tryCast(swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetMetadata<swift::InProcess> const*&, swift::TargetMetadata<swift::InProcess> const*&, bool, bool) + 1207 in libswiftCore.so
    7 [ra]         0x0000ffffa3bffd24 swift_dynamicCast + 67 in libswiftCore.so
    8 [ra]         0x0000ffffa3197b0c NSKeyedUnarchiver._decodeObject(_:) + 1295 in libFoundation.so
    9 [ra]         0x0000ffffa319895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   10 [ra]         0x0000ffffa3199274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   11 [ra]         0x0000aaaadbf74a54 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   12 [ra]         0x0000aaaadbf74c98 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   13 [ra]         0x0000aaaadbf301d4 Type.init(coder:) + 1231 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:584:52
   14 [ra]         0x0000aaaadbec1dd4 Enum.init(coder:) + 1027 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Enum_Linux.swift:154:19
   15 [ra] [thunk] 0x0000aaaadbec19c0 Enum.__allocating_init(coder:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Enum_Linux.swift
   16 [ra] [thunk] 0x0000aaaadbf752c0 protocol witness for NSCoding.init(coder:) in conformance Type + 23 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
   17 [ra]         0x0000ffffa3198298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   18 [ra]         0x0000ffffa3198cfc NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:withBlock:) + 283 in libFoundation.so
   19 [ra]         0x0000ffffa3198dac NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:) + 63 in libFoundation.so
   20 [ra] [thunk] 0x0000ffffa312ab6c NSArray.__allocating_init(coder:) + 159 in libFoundation.so
   21 [ra] [thunk] 0x0000ffffa312f7a0 protocol witness for NSCoding.init(coder:) in conformance NSArray + 23 in libFoundation.so
   22 [ra]         0x0000ffffa3198298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   23 [ra]         0x0000ffffa319895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   24 [ra]         0x0000ffffa3199274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   25 [ra]         0x0000aaaadbf74a54 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   26 [ra]         0x0000aaaadbf74c98 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   27 [ra]         0x0000aaaadbf31be0 Type.init(coder:) + 7899 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:672:57
   28 [ra]         0x0000aaaadbeefa78 Struct.init(coder:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift:90:19
   29 [ra] [thunk] 0x0000aaaadbeefa30 Struct.__allocating_init(coder:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Struct.swift
   30 [ra] [thunk] 0x0000aaaadbf752c0 protocol witness for NSCoding.init(coder:) in conformance Type + 23 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
   31 [ra]         0x0000ffffa3198298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   32 [ra]         0x0000ffffa319895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
   33 [ra]         0x0000ffffa3199274 NSKeyedUnarchiver.decodeObject(forKey:) + 27 in libFoundation.so
   34 [ra]         0x0000aaaadbf74a54 NSCoder.maybeDecode<A>(forKey:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:35:33
   35 [ra]         0x0000aaaadbf74c98 NSCoder.decode<A>(forKey:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/Generated/Coding.generated.swift:31:16
   36 [ra]         0x0000aaaadbf31fbc Type.init(coder:) + 8887 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Type_Linux.swift:685:36
   37 [ra]         0x0000aaaadbec1dd4 Enum.init(coder:) + 1027 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Enum_Linux.swift:154:19
   38 [ra] [thunk] 0x0000aaaadbec19c0 Enum.__allocating_init(coder:) + 55 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryRuntime/Sources/AST/Enum_Linux.swift
   39 [ra] [thunk] 0x0000aaaadbf752c0 protocol witness for NSCoding.init(coder:) in conformance Type + 23 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
   40 [ra]         0x0000ffffa3198298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   41 [ra]         0x0000ffffa3198cfc NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:withBlock:) + 283 in libFoundation.so
   42 [ra]         0x0000ffffa3198dac NSKeyedUnarchiver._decodeArrayOfObjectsForKey(_:) + 63 in libFoundation.so
   43 [ra] [thunk] 0x0000ffffa312ab6c NSArray.__allocating_init(coder:) + 159 in libFoundation.so
   44 [ra] [thunk] 0x0000ffffa312f7a0 protocol witness for NSCoding.init(coder:) in conformance NSArray + 23 in libFoundation.so
   45 [ra]         0x0000ffffa3198298 NSKeyedUnarchiver._decodeObject(_:) + 3227 in libFoundation.so
   46 [ra]         0x0000ffffa319895c NSKeyedUnarchiver._decodeObject(forKey:) + 363 in libFoundation.so
  ...
17090 [ra]         0x0000aaaadbe82110 closure #4 in Sourcery.processFiles(_:usingTemplates:output:isDryRun:forceParse:parseDocumentation:baseIndentation:) + 635 in sourcery at /home/tart/Documents/projects/Sourcery/Sourcery/Sourcery.swift:93:35
17091 [ra] [thunk] 0x0000aaaadbe82b58 partial apply for closure #4 in Sourcery.processFiles(_:usingTemplates:output:isDryRun:forceParse:parseDocumentation:baseIndentation:) + 87 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
17092 [ra]         0x0000aaaadbe81078 Sourcery.processFiles(_:usingTemplates:output:isDryRun:forceParse:parseDocumentation:baseIndentation:) + 1795 in sourcery at /home/tart/Documents/projects/Sourcery/Sourcery/Sourcery.swift:125:26
17093 [ra]         0x0000aaaadbe173f8 closure #2 in closure #1 in runCLI() + 919 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:387:37
17094 [ra] [thunk] 0x0000aaaadbe17570 partial apply for closure #2 in closure #1 in runCLI() + 67 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
17095 [ra]         0x0000ffffa3aa3224 Sequence.flatMap<A>(_:) + 535 in libswiftCore.so
17096 [ra]         0x0000aaaadbe15390 closure #1 in runCLI() + 1695 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:373:48
17097 [ra]         0x0000aaaadb797dec closure #1 in command<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) + 6799 in sourcery at /home/tart/Documents/projects/Sourcery/.build/checkouts/Commander/Sources/Commander/Commands.swift:1023:9
17098 [ra] [thunk] 0x0000aaaadb79a034 partial apply for closure #1 in command<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:_:) + 1759 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
17099 [ra]         0x0000aaaadb713e44 AnonymousCommand.run(_:) + 79 in sourcery at /home/tart/Documents/projects/Sourcery/.build/checkouts/Commander/Sources/Commander/Command.swift:10:9
17100 [ra] [thunk] 0x0000aaaadb713ebc protocol witness for CommandType.run(_:) in conformance AnonymousCommand + 31 in sourcery at /home/tart/Documents/projects/Sourcery/<compiler-generated>
17101 [ra]         0x0000aaaadb714fdc CommandType.run(_:) + 895 in sourcery at /home/tart/Documents/projects/Sourcery/.build/checkouts/Commander/Sources/Commander/CommandRunner.swift:24:11
17102 [ra]         0x0000aaaadbe14504 runCLI() + 4067 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:417:11
17103 [ra]         0x0000aaaadbe12654 SourceryExecutable_main + 11 in sourcery at /home/tart/Documents/projects/Sourcery/SourceryExecutable/main.swift:420:1
17104 [ra]         0x0000ffffa26573fc __libc_start_call_main + 107 in libc.so.6
17105 [ra]         0x0000ffffa26574cc __libc_start_main@GLIBC_2.17 + 151 in libc.so.6


Registers:

 x0 0x0000ffffa3d7d3e4  d2 00 08 00 f8 a1 ff ff ec ff ff ff 7c 0d c2 ff  Ò···ø¡ÿÿìÿÿÿ|·Âÿ
 x1 0x0000ffffc9167168  80 ee d5 a3 ff ff 00 00 80 ee d5 a3 ff ff 00 00  ·îÕ£ÿÿ···îÕ£ÿÿ··
 x2 0x0000ffffa3d7d3e4  d2 00 08 00 f8 a1 ff ff ec ff ff ff 7c 0d c2 ff  Ò···ø¡ÿÿìÿÿÿ|·Âÿ
 x3 0x0000ffffa3e58ee0  ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00  ÿÿÿÿ············
 x4 0x0000ffffa3d7d3e4  d2 00 08 00 f8 a1 ff ff ec ff ff ff 7c 0d c2 ff  Ò···ø¡ÿÿìÿÿÿ|·Âÿ
 x5 0x0000ffffa3e58ee0  ff ff ff ff 00 00 00 00 00 00 00 00 00 00 00 00  ÿÿÿÿ············
 x6 0x0000ffffa3d4e7e8  b8 2f d7 a3 ff ff 00 00 70 e8 d4 a3 ff ff 00 00  ¸/×£ÿÿ··pèÔ£ÿÿ··
 x7 0x0000ffffa3d4e7e8  b8 2f d7 a3 ff ff 00 00 70 e8 d4 a3 ff ff 00 00  ¸/×£ÿÿ··pèÔ£ÿÿ··
 x8 0x00000000ffffffff  4294967295
 x9 0x00000000000800d1  524497
x10 0x0000000000000011  17
x11 0x0000000000020000  131072
x12 0x0000ffffa3d93554  00 05 09 0d 28 00 00 1e 51 00 2b 44 44 44 11 44  ····(···Q·+DDD·D
x13 0x0000000000000026  38
x14 0x0000ffffa3491220  00 00 00 00 00 00 00 00 40 33 49 a3 ff ff 00 00  ········@3I£ÿÿ··
x15 0x0000ffffa3d77bb4  43 00 02 00 28 fa ff ff e8 ff ff ff 01 00 00 00  C···(úÿÿèÿÿÿ····
x16 0x0000000000000001  1
x17 0x0000ffffa3bffce0  ff 03 01 d1 fd 7b 01 a9 f6 57 02 a9 f4 4f 03 a9  ÿ··Ñý{·©öW·©ôO·©
x18 0x0000000000000000  0
x19 0x0000000000000000  0
x20 0x0000ffffc9167168  80 ee d5 a3 ff ff 00 00 80 ee d5 a3 ff ff 00 00  ·îÕ£ÿÿ···îÕ£ÿÿ··
x21 0x0000ffffa3d7d3e4  d2 00 08 00 f8 a1 ff ff ec ff ff ff 7c 0d c2 ff  Ò···ø¡ÿÿìÿÿÿ|·Âÿ
x22 0x0000ffffa3d5ee80  03 03 00 00 00 00 00 00 00 00 00 80 00 00 00 00  ················
x23 0x0000ffffa3d4e7e8  b8 2f d7 a3 ff ff 00 00 70 e8 d4 a3 ff ff 00 00  ¸/×£ÿÿ··pèÔ£ÿÿ··
x24 0x0000ffffa3d51aa8  00 02 00 00 00 00 00 00 88 bf d7 a3 ff ff 00 00  ·········¿×£ÿÿ··
x25 0x0000aaaae0f70280  18 ab da e0 aa aa 00 00 03 00 00 00 06 00 00 00  ·«Úપ··········
x26 0x0000000000000001  1
x27 0x0000ffffa3d530c8  00 02 00 00 00 00 00 00 48 ed d7 a3 ff ff 00 00  ········Hí×£ÿÿ··
x28 0x0000000000000200  512
 fp 0x0000ffffc9167100  80 71 16 c9 ff ff 00 00 88 1d bf a3 ff ff 00 00  ·q·Éÿÿ····¿£ÿÿ··
 lr 0x0000ffffa3c0eba0  2c 1a 90 52 08 c0 40 79 4c d7 aa 72 f6 03 00 aa  ,··R·À@yLתrö··ª
 sp 0x0000ffffc9166f50  281474055434064
 pc 0x0000ffffa3c0e2bc  fd 7b 07 a9 fc 6f 08 a9 fa 67 09 a9 f8 5f 0a a9  ý{·©üo·©úg·©ø_·©


Images (54 omitted):

0x0000aaaadb2e0000–0x0000aaaadf3319e0 <no build ID>                            sourcery         /home/tart/Documents/projects/Sourcery/.build/aarch64-unknown-linux-gnu/debug/sourcery
0x0000ffffa2630000–0x0000ffffa27b8244 f37f3aa07c797e333fd106472898d361f71798f5 libc.so.6        /usr/lib/aarch64-linux-gnu/libc.so.6
0x0000ffffa2d40000–0x0000ffffa3440628 <no build ID>                            libFoundation.so /home/tart/.local/share/swiftly/toolchains/5.9-snapshot-2023-08-29/usr/lib/swift/linux/libFoundation.so
0x0000ffffa3840000–0x0000ffffa3d33c88 <no build ID>                            libswiftCore.so  /home/tart/.local/share/swiftly/toolchains/5.9-snapshot-2023-08-29/usr/lib/swift/linux/libswiftCore.so

@lassejansen
Copy link

lassejansen commented Oct 18, 2023

I'm seeing a similar issue with Swift 5.9 (Release-Version) on Ubuntu 22.04:

*** Program crashed: Bad pointer dereference at 0x0000564493243978 ***

Thread 0 "[redacted]":

0  0x00007f89b130982d <unknown> in libc.so.6

Thread 1:

0  0x00007f89b127f117 <unknown> in libc.so.6

Thread 2 crashed:

0  0x00007f89b2643388 swift_retain + 56 in libswiftCore.so


Registers:

rax 0x00000000801f0fff  2149519359
rdx 0x00007f89ab499900  a0 fe 6f 94 44 56 00 00 00 00 00 00 00 00 00 00   þo·DV··········
rcx 0x0000564493243978  ff 0f 1f 80 00 00 00 00 55 48 89 e5 48 8b 05 75  ÿ·······UH·åH··u
rbx 0x0000000200000000  8589934592
rsi 0x0000564493243970  49 8b 7d 10 e9 57 f1 ff ff 0f 1f 80 00 00 00 00  I·}·éWñÿÿ·······
rdi 0x00000002801f0fff  10739453951
rbp 0x0000000000000000  0
rsp 0x00007f89ab4995a8  27 ff 23 93 44 56 00 00 00 00 00 00 02 00 00 00  'ÿ#·DV··········
 r8 0x0000000000000000  0
 r9 0x80000000ffffffff  9223372041149743103
r10 0x0000000100000000  4294967296
r11 0x6378b1b0fbd84080  7167674180657758336
r12 0x0000000000000000  0
r13 0x0000000000000000  0
r14 0x0000000000000000  0
r15 0x0000000000000000  0
rip 0x00007f89b2643388  f0 48 0f b1 31 75 f1 48 89 f8 c3 83 f8 ff 74 f7  ðH·±1uñH·ø÷øÿt÷

rflags 0x0000000000010206  PF

cs 0x0033  fs 0x0000  gs 0x0000


Images (70 omitted):

0x00007f89b11ee000–0x00007f89b13aa541 a43bfc8428df6623cd498c9c0caeb91aec9be4f9 libc.so.6       /usr/lib/x86_64-linux-gnu/libc.so.6
0x00007f89b224a000–0x00007f89b2787d68 <no build ID>                            libswiftCore.so /opt/swift-5.9/usr/lib/swift/linux/libswiftCore.so

This doesn't occur with Swift 5.8 on Ubuntu 22.04. and it also doesn't occur with Swift 5.9 on macOS.

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. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

2 participants