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

swift-nio-http2 crashes the compiler

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      Description

      Building swift-nio-http2 from a development branch deterministically crashes the compiler. This works with the 5.3 nightly from the 4th of May.

      Crash details:

      Unhandled, unexpected instruction:   %7 = select_enum_addr %1 : $*Optional<(T1, T2)>, case #Optional.some!enumelt: %5, default %6 : $Builtin.Int1 // user: %8
      invoking standard assertion failure
      UNREACHABLE executed at /home/buildnode/jenkins/workspace/oss-swift-5.3-package-linux-ubuntu-18_04/swift/lib/SIL/Verifier/SILVerifier.cpp:639!
      Stack dump:
      0.	Program arguments: /usr/bin/swift -frontend -c /code/Tests/NIOHPACKTests/HPACKCodingTests+XCTest.swift /code/Tests/NIOHPACKTests/HPACKCodingTests.swift /code/Tests/NIOHPACKTests/HPACKIntegrationTests+XCTest.swift /code/Tests/NIOHPACKTests/HPACKIntegrationTests.swift /code/Tests/NIOHPACKTests/HPACKRegressionTests+XCTest.swift /code/Tests/NIOHPACKTests/HPACKRegressionTests.swift -primary-file /code/Tests/NIOHPACKTests/HeaderTableTests+XCTest.swift -primary-file /code/Tests/NIOHPACKTests/HeaderTableTests.swift -primary-file /code/Tests/NIOHPACKTests/HuffmanCodingTests+XCTest.swift /code/Tests/NIOHPACKTests/HuffmanCodingTests.swift /code/Tests/NIOHPACKTests/IntegerCodingTests+XCTest.swift /code/Tests/NIOHPACKTests/IntegerCodingTests.swift -emit-module-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests+XCTest~partial.swiftmodule -emit-module-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests~partial.swiftmodule -emit-module-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HuffmanCodingTests+XCTest~partial.swiftmodule -emit-module-doc-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests+XCTest~partial.swiftdoc -emit-module-doc-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests~partial.swiftdoc -emit-module-doc-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HuffmanCodingTests+XCTest~partial.swiftdoc -emit-module-source-info-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests+XCTest~partial.swiftsourceinfo -emit-module-source-info-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests~partial.swiftsourceinfo -emit-module-source-info-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HuffmanCodingTests+XCTest~partial.swiftsourceinfo -emit-dependencies-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests+XCTest.d -emit-dependencies-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests.d -emit-dependencies-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HuffmanCodingTests+XCTest.d -emit-reference-dependencies-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests+XCTest.swiftdeps -emit-reference-dependencies-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests.swiftdeps -emit-reference-dependencies-path /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HuffmanCodingTests+XCTest.swiftdeps -target x86_64-unknown-linux-gnu -disable-objc-interop -I /code/.build/x86_64-unknown-linux-gnu/debug -I /code/.build/checkouts/swift-nio/Sources/CNIOHTTPParser/include -I /code/.build/checkouts/swift-nio/Sources/CNIOSHA1/include -I /code/.build/checkouts/swift-nio/Sources/CNIOAtomics/include -I /code/.build/checkouts/swift-nio/Sources/CNIODarwin/include -I /code/.build/checkouts/swift-nio/Sources/CNIOLinux/include -enable-testing -g -module-cache-path /code/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -warnings-as-errors -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -color-diagnostics -enable-anonymous-context-mangled-names -Xcc -fmodule-map-file=/code/.build/x86_64-unknown-linux-gnu/debug/CNIOHTTPParser.build/module.modulemap -Xcc -fmodule-map-file=/code/.build/x86_64-unknown-linux-gnu/debug/CNIOSHA1.build/module.modulemap -Xcc -fmodule-map-file=/code/.build/x86_64-unknown-linux-gnu/debug/CNIOAtomics.build/module.modulemap -Xcc -fmodule-map-file=/code/.build/x86_64-unknown-linux-gnu/debug/CNIODarwin.build/module.modulemap -Xcc -fmodule-map-file=/code/.build/x86_64-unknown-linux-gnu/debug/CNIOLinux.build/module.modulemap -parse-as-library -module-name NIOHPACKTests -o /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests+XCTest.swift.o -o /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HeaderTableTests.swift.o -o /code/.build/x86_64-unknown-linux-gnu/debug/NIOHPACKTests.build/HuffmanCodingTests+XCTest.swift.o -index-store-path /code/.build/x86_64-unknown-linux-gnu/debug/index/store -index-system-modules 
      1.	Swift version 5.3-dev (LLVM 6855d3af88, Swift d33ecd327b)
      2.	While evaluating request SILGenSourceFileRequest(SIL Generation for file "/code/Tests/NIOHPACKTests/HeaderTableTests.swift")
      3.	While emitting SIL for 'XCTAssertEqualTuple(_:_:_:file:line:)' (at /code/Tests/NIOHPACKTests/HeaderTableTests.swift:19:1)
      4.	While silgen emitFunction SIL function "@$s13NIOHPACKTests19XCTAssertEqualTuple___4file4lineyx_q_tSgyKXK_AEyKXKSSyXKs12StaticStringVSutSQRzSQR_r0_lF".
       for 'XCTAssertEqualTuple(_:_:_:file:line:)' (at /code/Tests/NIOHPACKTests/HeaderTableTests.swift:19:1)
      5.	While silgen closureexpr SIL function "@$s13NIOHPACKTests19XCTAssertEqualTuple___4file4lineyx_q_tSgyKXK_AEyKXKSSyXKs12StaticStringVSutSQRzSQR_r0_lFxSgyKXEfu_".
       for expression at [/code/Tests/NIOHPACKTests/HeaderTableTests.swift:31:20 - line:31:25] RangeText="ex1?."
      6.	While verifying SIL function "@$s13NIOHPACKTests19XCTAssertEqualTuple___4file4lineyx_q_tSgyKXK_AEyKXKSSyXKs12StaticStringVSutSQRzSQR_r0_lFxSgyKXEfu_".
       for expression at [/code/Tests/NIOHPACKTests/HeaderTableTests.swift:31:20 - line:31:25] RangeText="ex1?."
      /usr/bin/swift[0x51d1234]
      /usr/bin/swift[0x51cee2e]
      /usr/bin/swift[0x51d150c]
      /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f4f09be2890]
      /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7)[0x7f4f0824de97]
      /lib/x86_64-linux-gnu/libc.so.6(abort+0x141)[0x7f4f0824f801]
      /usr/bin/swift[0x5125ca6]
      /usr/bin/swift[0x121ddf5]
      /usr/bin/swift[0x12060a4]
      /usr/bin/swift[0x11ffd66]
      /usr/bin/swift[0x9af87b]
      /usr/bin/swift[0x9b0bb8]
      /usr/bin/swift[0xa13d29]
      /usr/bin/swift[0xa048aa]
      /usr/bin/swift[0x9f8ad8]
      /usr/bin/swift[0xa829b0]
      /usr/bin/swift[0x9de87b]
      /usr/bin/swift[0xa82b63]
      /usr/bin/swift[0xab3eaa]
      /usr/bin/swift[0xa9dd42]
      /usr/bin/swift[0xab2977]
      /usr/bin/swift[0xabd119]
      /usr/bin/swift[0xaa2ffa]
      /usr/bin/swift[0xaa01b2]
      /usr/bin/swift[0xa04890]
      /usr/bin/swift[0x9f8ffb]
      /usr/bin/swift[0xa6fd83]
      /usr/bin/swift[0xa6fc1d]
      /usr/bin/swift[0xa20873]
      /usr/bin/swift[0x9b8be7]
      /usr/bin/swift[0x9ae11c]
      /usr/bin/swift[0x9b5bcc]
      /usr/bin/swift[0x9b5712]
      /usr/bin/swift[0xa6f60c]
      /usr/bin/swift[0x9bbb26]
      /usr/bin/swift[0x9b72fe]
      /usr/bin/swift[0x9b7204]
      /usr/bin/swift[0x5611a6]
      /usr/bin/swift[0x55e469]
      /usr/bin/swift[0x4e8458]
      /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f4f08230b97]
      /usr/bin/swift[0x4e7ffa]
      

      Reproduction instructions

      git clone https://github.com/Lukasa/swift-nio-http2.git
      cd swift-nio-http2
      git checkout cb-huffman-pointers
      xcrun --toolchain org.swift.53202005041a swift test
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            lukasa Cory Benfield
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: