Bug 51645 - REGRESSION: Testing a string with a regex of the form /(?:x|^)$/ crashes WebKit
Summary: REGRESSION: Testing a string with a regex of the form /(?:x|^)$/ crashes WebKit
Status: RESOLVED DUPLICATE of bug 51284
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.6
: P1 Normal
Assignee: Michael Saboff
URL: http://www.html5rocks.com/tutorials/f...
Keywords: Regression
Depends on:
Reported: 2010-12-27 07:21 PST by Nate Whetsell
Modified: 2011-01-03 15:27 PST (History)
3 users (show)

See Also:

Test document (148 bytes, text/html)
2010-12-27 07:21 PST, Nate Whetsell
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nate Whetsell 2010-12-27 07:21:57 PST
Created attachment 77506 [details]
Test document

Testing a string against a regex of the form /(?:x|^)$/, where x can be any character, crashes WebKit. There can be any number of things separated by |'s. The crash seems to be triggered when the non-capturing parentheses include a ^ and are followed by a $. Also, it seems that the parentheses must be non-capturing.

A regular expression like this gets used in the html5rocks.com website. I'm also attaching a reduced version that just tests a string against /(?:x|^)$/.
Comment 1 Michael Saboff 2010-12-31 21:42:45 PST
I am not able to reproduce this bug in recent changeset 74813.  I suspect that this is a duplicate of another bug, possibly https://bugs.webkit.org/show_bug.cgi?id=51284 but I can't reproduce at this time.  Will try to reproduce.
Comment 2 Michael Saboff 2011-01-03 15:27:49 PST

*** This bug has been marked as a duplicate of bug 51284 ***