-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
| Previous ID | SR-3509 |
| Radar | None |
| Original Reporter | bnut (JIRA User) |
| Type | Bug |
| Status | Resolved |
| Resolution | Done |
Attachment: Download
Environment
xcodebuild -version Xcode 8.2 Build version 8C38
swift --version Apple Swift version 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1) Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Foundation |
| Labels | Bug, RunTimeCrash |
| Assignee | None |
| Priority | Medium |
md5: b6a77aabb80a8d86278845247ab9a265
Issue Description:
The following code causes a crash in foundation at runtime:
var set = CharacterSet()
set.insert("\u{D7FF}") // no crash
set.insert("\u{D7FF}") // no crash
set.insert(charactersIn: "\u{D7FE}"..."\u{D7FF}") // crashesAccording to the UnicodeScalar.init(_:UInt32) source, 0xD7FF is a valid character:
// * As a result of this definition, the set of Unicode scalar values
// consists of the ranges 0 to D7FF and E000 to 10FFFF, inclusive.I suspect there is an edge case where 0xD7FF is accidentally excluded.