Bug 16323 - Regexp functions fail silently when stack limit is exceeded
Summary: Regexp functions fail silently when stack limit is exceeded
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 01:14 PST by Eric Seidel (no email)
Modified: 2009-06-26 18:18 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-12-06 01:14:12 PST
Regexp functions fail silently when stack limit is exceeded

var re = new RegExp("(\cd{4,}|[(\u006c)]*?)*", "imy");
"foo".match(re);

All this does is print:
jsRegExpExecute failed with result -5

To the console.  I would have expected it to throw an exception.
Comment 1 David Kilzer (:ddkilzer) 2007-12-06 08:25:53 PST
What does Firefox or MSIE do in this case?

Comment 2 Darin Adler 2007-12-06 08:39:25 PST
Changing this will be very simple once we decide what behavior we want.
Comment 3 Eric Seidel (no email) 2007-12-06 16:21:30 PST
Actually this same regexp fails that way:

var re = new RegExp("(a*)*");
"a".match(re);

Which it shouldn't.  This is a bug in our regexp correctness.