Bug 16323
| Summary: | Regexp functions fail silently when stack limit is exceeded | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | darin, dmandelin, ggaren, jwalden+bwo |
| Priority: | P2 | ||
| Version: | 523.x (Safari 3) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
Eric Seidel (no email)
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.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
What does Firefox or MSIE do in this case?
Darin Adler
Changing this will be very simple once we decide what behavior we want.
Eric Seidel (no email)
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.