Uploaded image for project: 'Swift'
  1. Swift
  2. SR-6874

Swift 4.1 compiler crash when building release configuration

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Environment:

      macOS 10.13.3

      Swift 4.1 bundled with Xcode 9.3 beta (9Q98q)

      Swift 4.1 Snapshot 2018-01-29 (a)

      Description

      While testing a SPM project with Swift 4.1 I ran into a regression. The compiler crashes when building the release configuration.

      <unknown>:0: error: fatal error encountered while reading from module 'CSV'; please file a bug report with your project and the crash log
      
      *** DESERIALIZATION FAILURE (please include this section in any bug report) ***
      couldn't decode type
      Cross-reference to module 'Foundation'
      ... CharacterSet
      ... _storage
      
      0  swift                    0x00000001045f0168 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
      1  swift                    0x00000001045f0876 SignalHandler(int) + 694
      2  libsystem_platform.dylib 0x00007fff74d6cf5a _sigtramp + 26
      3  libsystem_platform.dylib 000000000000000000 _sigtramp + 2334732480
      4  libsystem_c.dylib        0x00007fff74b97312 abort + 127
      5  swift                    0x0000000101f26012 swift::ModuleFile::fatal(llvm::Error) + 706
      6  swift                    0x0000000101f26566 swift::ModuleFile::getDecl(llvm::PointerEmbeddedInt<unsigned int, 31>, llvm::Optional<swift::DeclContext*>) + 198
      7  swift                    0x0000000101f4cbaf swift::SILDeserializer::readSILInstruction(swift::SILFunction*, swift::SILBasicBlock*, swift::SILBuilder&, unsigned int, llvm::SmallVectorImpl<unsigned long long>&) + 3407
      8  swift                    0x0000000101f4a93b swift::SILDeserializer::readSILFunction(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool) + 5195
      9  swift                    0x0000000101f5b1e7 swift::SILDeserializer::lookupSILFunction(swift::SILFunction*) + 439
      10 swift                    0x0000000101fd4c0b swift::SerializedSILLoader::lookupSILFunction(swift::SILFunction*) + 75
      11 swift                    0x0000000101c68f29 swift::SILLinkerVisitor::processFunction(swift::SILFunction*) + 121
      12 swift                    0x0000000101ce37a5 swift::SILModule::linkFunction(swift::SILFunction*, swift::SILOptions::LinkingMode) + 117
      13 swift                    0x00000001019e1d04 runOnFunctionRecursively(swift::SILFunction*, swift::FullApplySite, swift::SILOptions::LinkingMode, llvm::DenseSet<swift::SILFunction*, llvm::DenseMapInfo<swift::SILFunction*> >&, llvm::ImmutableSet<swift::SILFunction*, llvm::ImutContainerInfo<swift::SILFunction*> >::Factory&, llvm::ImmutableSet<swift::SILFunction*, llvm::ImutContainerInfo<swift::SILFunction*> >, swift::ClassHierarchyAnalysis*) + 3780
      14 swift                    0x00000001019e0c88 (anonymous namespace)::MandatoryInlining::run() + 408
      15 swift                    0x000000010195a1ab swift::SILPassManager::runModulePass(swift::SILModuleTransform*) + 1355
      16 swift                    0x000000010195ad21 swift::SILPassManager::runOneIteration() + 1025
      17 swift                    0x000000010120527b swift::SILPassManager::executePassPipelinePlan(swift::SILPassPipelinePlan const&) + 187
      18 swift                    0x000000010196357c swift::runSILDiagnosticPasses(swift::SILModule&) + 172
      19 swift                    0x00000001010abbbc performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 10684
      20 swift                    0x00000001010a8220 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 3376
      21 swift                    0x0000000101067ac3 main + 3075
      22 libdyld.dylib            0x00007fff74aeb115 start + 1
      

      The attached project reproduces the crash.

      I am able to reproduce the crash with Swift 4.1 included with Xcode 9.3 beta 1 and also Swift 4.1 Snapshot 2018-01-29 (a).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jrose Jordan Rose
              Reporter:
              florianreinhart Florian Reinhart
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: