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-8618] Swiftc crash compiling SwiftObjects #51133

Closed
swift-ci opened this issue Aug 23, 2018 · 5 comments
Closed

[SR-8618] Swiftc crash compiling SwiftObjects #51133

swift-ci opened this issue Aug 23, 2018 · 5 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

@swift-ci
Copy link
Collaborator

Previous ID SR-8618
Radar rdar://problem/43645562
Original Reporter helge (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

helge@ZeaPro SwiftObjects (develop)*$ swift --version
Apple Swift version 4.2 (swiftlang-1000.0.36 clang-1000.10.44)
Target: x86_64-apple-darwin17.7.0

macOS 10.13.6 (17G65)
Xcode Version 10.0 beta 6 (10L232m)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash
Assignee None
Priority Medium

md5: d1d57f7b1f247d972501051f241ea3f7

duplicates:

  • SR-8099 Nest all swift auxiliary files similar to the object files

Issue Description:

When compiling SwiftObjects w/ Xcode 10b6 on the command line, the compiler crashes:

Repro:

git clone https://github.com/SwiftObjects/SwiftObjects.git
git checkout 622358886658c2df8357a5ae87b979dad78c093a
swift build
...

Crash:

Compile Swift Module 'WOShowcaseApp' (15 sources)
<unknown>:0: error: fatal error encountered while reading from module 'WOShowcaseApp'; please file a bug report with your project and the crash log

*** DESERIALIZATION FAILURE (please include this section in any bug report) ***
(see "While..." info below)
0  swift                    0x00000001110ae37a PrintStackTraceSignalHandler(void*) + 42
1  swift                    0x00000001110adb2e SignalHandler(int) + 302
2  libsystem_platform.dylib 0x00007fff6b64ef5a _sigtramp + 26
3  libsystem_platform.dylib 0x000000011bf75314 _sigtramp + 2962383828
4  libsystem_c.dylib        0x00007fff6b3ec1ae abort + 127
5  swift                    0x000000010e52db0b swift::ModuleFile::fatal(llvm::Error) + 1915
6  swift                    0x000000010e550b99 swift::SILDeserializer::readSILFunctionChecked(llvm::PointerEmbeddedInt<unsigned int, 31>, swift::SILFunction*, llvm::StringRef, bool, bool) + 2249
7  swift                    0x000000010e5670d7 swift::SILDeserializer::getAllSILFunctions() + 967
8  swift                    0x000000010e60e1ba swift::SerializedSILLoader::getAllForModule(swift::Identifier, swift::FileUnit*) + 170
9  swift                    0x000000010d370c0e performCompile(swift::CompilerInstance&, swift::CompilerInvocation&, llvm::ArrayRef<char const*>, int&, swift::FrontendObserver*, swift::UnifiedStatsReporter*) + 34558
10 swift                    0x000000010d365015 swift::performFrontend(llvm::ArrayRef<char const*>, char const*, void*, swift::FrontendObserver*) + 7717
11 swift                    0x000000010d30ac95 main + 1349
12 libdyld.dylib            0x00007fff6b340015 start + 1
13 libdyld.dylib            0x000000000000004c start + 2496397368
Stack dump:
0.  Program arguments: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift -frontend -merge-modules -emit-module /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/Application~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/ComponentBindingInfo~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/CowCard~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/DemoWOForm~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/DemoWOHyperlink~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/DemoWORepetition~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/DemoWOString~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/DynamicElementSample~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/Frame~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/Main~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/Context~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/CowModel~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/DirectAction~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/Session~partial.swiftmodule /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.build/main~partial.swiftmodule -parse-as-library -sil-merge-partial-modules -disable-diagnostic-passes -disable-sil-perf-optzns -target x86_64-apple-macosx10.10 -enable-objc-interop -sdk /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio.git--8579077972352586130/Sources/CNIOZlib/include -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio.git--8579077972352586130/Sources/CNIOHTTPParser/include -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio.git--8579077972352586130/Sources/CNIOSHA1/include -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio.git--8579077972352586130/Sources/CNIOAtomics/include -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio.git--8579077972352586130/Sources/CNIODarwin/include -I /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio.git--8579077972352586130/Sources/CNIOLinux/include -F /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/Library/Frameworks -enable-testing -g -module-cache-path /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/ModuleCache -swift-version 4 -Onone -D SWIFT_PACKAGE -D DEBUG -color-diagnostics -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/CNIOZlib.build/module.modulemap -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/CNIOHTTPParser.build/module.modulemap -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/CNIOSHA1.build/module.modulemap -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/CNIOAtomics.build/module.modulemap -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/CNIODarwin.build/module.modulemap -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/CNIOLinux.build/module.modulemap -Xcc -fmodule-map-file=/Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/checkouts/swift-nio-zlib-support.git--900067575413435396/module.modulemap -emit-module-doc-path /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.swiftdoc -module-name WOShowcaseApp -o /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/x86_64-apple-macosx10.10/debug/WOShowcaseApp.swiftmodule 
1.  While deserializing SIL function "$S13WOShowcaseApp4MainC5demosSaySSGvm"
<unknown>:0: error: unable to execute command: Abort trap: 6
<unknown>:0: error: merge-module command failed due to signal 6 (use -v to see invocation)
error: terminated(1): /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/helge/dev/Swift/SwiftObjects/SwiftObjects/.build/debug.yaml main output:
@belkadan
Copy link
Contributor

Thanks! Just to be sure, can you include the Package.resolved as well?

@swift-ci create

@swift-ci
Copy link
Collaborator Author

Comment by Helge Heß (JIRA)

BTW: It does seem to build when generating an xcodeproj and building from within Xcode, the issue seems limited to the cmdline (but repro's 100% for me using the instructions).

@belkadan
Copy link
Contributor

Interesting, thanks.

@belkadan
Copy link
Contributor

Ah, hey, this is the same one Johannes reported.

@swift-ci
Copy link
Collaborator Author

Comment by Helge Heß (JIRA)

Nice, he is testing SwiftObjects, so very much appropriate 🙂 👍

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
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