Bad Regex Hangs Xcode
| Originator: | wetzeal | ||
| Number: | rdar://22408703 | Date Originated: | 24-Aug-2015 04:47 PM |
| Status: | Duplicate/18679649/Open | Resolved: | 14-Jun-2016 |
| Product: | Developer Tools | Product Version: | Xcode-beta (7A176x) |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: Doing a local search for the regex “(.*)+; //(.*)+^” will hang Xcode, and continue to hang every time the search field is opened. Steps to Reproduce: 1. Open a file in Xcode 2. Open the in-pane search field with command+F 3. Change the Find options to “Regular Expression” 4. Paste the following regular expression in to the field: (.*)+; //(.*)+^ Expected Results: Nothing is found, or some error is shown to indicate the regex is invalid Actual Results: Xcode hangs permanently, and hangs every time the search field is opened after relaunch. Regression: This happens in Xcode 7 beta as well as Xcode 6. Notes: The regex is cached in some global OS X cache. The cache can be cleared by opening a search bar in another application, like Safari, and changing the search text.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!