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

[SR-12781] swift-nio-http2 crashes the compiler #55226

Open
Lukasa opened this issue May 11, 2020 · 2 comments
Open

[SR-12781] swift-nio-http2 crashes the compiler #55226

Lukasa opened this issue May 11, 2020 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software

Comments

@Lukasa
Copy link
Contributor

Lukasa commented May 11, 2020

Previous ID SR-12781
Radar rdar://problem/63083691
Original Reporter @Lukasa
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, Crash
Assignee None
Priority Medium

md5: a2ea3f233e63f63e9007b779340ddde4

Issue 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
@Lukasa
Copy link
Contributor Author

Lukasa commented May 11, 2020

@swift-ci create

@weissi
Copy link
Member

weissi commented Jun 13, 2020

sadly, no movement here in over a month, so apple/swift-nio-http2#208

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added CompilerCrash and removed crash Bug: A crash, i.e., an abnormal termination of software labels Sep 17, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
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 in itself crash Bug: A crash, i.e., an abnormal termination of software
Projects
None yet
Development

No branches or pull requests

3 participants