[SR-4947] IndexSet iteration fails catastrophically for empty sets that used to have values #47524
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
crash
Bug: A crash, i.e., an abnormal termination of software
run-time crash
Bug → crash: Swift code crashed during execution
SDKOverlay
Environment
macOS 10.12.5 (16F73)
Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: bd94fd8a4eb24e170a7ac65ec872ae0e
Issue Description:
If you take an empty
IndexSet
and iterate over it, everything works fine (which is to say, it does nothing). If you insert an index into that set and then remove the index from that set, iterating over the set throws an out of bounds exception.This only happens on macOS. Running this same code on Linux does not reproduce this issue.
Code:
Output:
The text was updated successfully, but these errors were encountered: