Uploaded image for project: 'Swift'
  1. Swift
  2. SR-3215

CharacterSet(charactersIn: String) crashes when string contains 64 or more characters

    XMLWordPrintable

    Details

      Description

      When trying to initialize a `CharacterSet` using `(charactersIn: String)`, the application crashes with a seg fault if the string contains 64 or more characters. It doesn't seem to matter what characters are included.

      The issue occurs on Ubuntu 16.04 (haven't tested other versions) but does NOT occur on macOS.
      Tested on Swift 3.0.1 Release and swift-DEVELOPMENT-SNAPSHOT-2016-11-12-a-ubuntu16.04

      Steps to reproduce in REPL:

      import Foundation
      let charSet = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789&+")
      

      >> Execution interrupted.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            collinhundley Collin Hundley
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: