[SR-3915] 3.1 compiler crashes during deserialization in merge module step #46500
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
serialization
Area → compiler: Serialization & deserialization
Attachment: Download
Environment
Apple Swift version 3.1-dev (LLVM 3887fe8485, Clang f9a0f935a5, Swift 59037e9)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: f5e1786b01effe41efff918d590478b6
Issue Description:
We found this issue in a library of ours. After some very interesting investigation, we were able to reduce it down to a small reproducible case.
This bug can be reproduced using Xcode 8.3b2 or swift-DEVELOPMENT-SNAPSHOT-2017-02-09-a. It couldn't be reproduced with Xcode 8.2.1.
In the test case we have two files:
A.swift
B.swift
Compile these two files will yield an crash:
This also fails using an Xcode project. The flag
-Xfrontend -disable-serialization-nested-type-lookup-table
did not change the result.Unsurprisingly, merging the two files fixed the issue.
What's fascinating is that if we change
A.B.A
to something different, such asZ.B.Z
, it may compile successfully. We included this test case too withGoodA.swift
andGoodB.swift
files. We discovered other letters/words that led to crash or success. We also found other failed cases that are a little more complicated during our investigation. We can provide those if needed.This might be related to SR-3707. As far as I could tell, the commit that fixes SR-3707 was already included in the snapshot I used to test.
The text was updated successfully, but these errors were encountered: