Commit 0856b869 authored by darin@apple.com's avatar darin@apple.com

JavaScriptCore:

        Reviewed by Sam.

        - http://bugs.webkit.org/show_bug.cgi?id=15951
          REGRESSION: assertion failure in regexp match() when running JS tests

        Test: fast/js/regexp-many-brackets.html

        * pcre/pcre_exec.cpp: (match): Added back accidentally-removed case for
        the BRANUMBER opcode.

LayoutTests:

        Reviewed by Sam.

        - test for http://bugs.webkit.org/show_bug.cgi?id=15951
          REGRESSION: assertion failure in regexp match() when running JS tests

        * fast/js/regexp-many-brackets-expected.txt: Added.
        * fast/js/regexp-many-brackets.html: Added.
        * fast/js/resources/regexp-many-brackets.js: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27733 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9c61d803
2007-11-12 Darin Adler <darin@apple.com>
Reviewed by Sam.
- http://bugs.webkit.org/show_bug.cgi?id=15951
REGRESSION: assertion failure in regexp match() when running JS tests
Test: fast/js/regexp-many-brackets.html
* pcre/pcre_exec.cpp: (match): Added back accidentally-removed case for
the BRANUMBER opcode.
2007-11-12 Darin Adler <darin@apple.com>
Reviewed by Geoff.
......
......@@ -446,6 +446,12 @@ for (;;)
DPRINTF(("bracket 0 failed\n"));
RRETURN;
/* Skip over large extraction number data if encountered. */
BEGIN_OPCODE(BRANUMBER):
frame->ecode += 3;
NEXT_OPCODE;
/* End of the pattern. */
BEGIN_OPCODE(END):
......@@ -1852,7 +1858,6 @@ for (;;)
}
/* Control never gets here */
BEGIN_OPCODE(BRANUMBER):
BEGIN_OPCODE(CRMINPLUS):
BEGIN_OPCODE(CRMINQUERY):
BEGIN_OPCODE(CRMINRANGE):
......
2007-11-12 Darin Adler <darin@apple.com>
Reviewed by Sam.
- test for http://bugs.webkit.org/show_bug.cgi?id=15951
REGRESSION: assertion failure in regexp match() when running JS tests
* fast/js/regexp-many-brackets-expected.txt: Added.
* fast/js/regexp-many-brackets.html: Added.
* fast/js/resources/regexp-many-brackets.js: Added.
2007-11-12 Geoffrey Garen <ggaren@apple.com>
Rubber-stamped by Oliver Hunt.
......
Test regular expression processing with many capturing brackets (200).
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS 'hello'.match(manyBracketsRegExp) is manyHellosArray
PASS successfullyParsed is true
TEST COMPLETE
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="resources/js-test-style.css">
<script src="resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script src="resources/regexp-many-brackets.js"></script>
<script src="resources/js-test-post.js"></script>
</body>
</html>
description(
'Test regular expression processing with many capturing brackets (200).'
);
var count = 200;
var regexp = "";
for (var i = 0; i < count; ++i)
regexp += "(";
regexp += "hello";
for (var i = 0; i < count; ++i)
regexp += ")";
var manyHellosArray = new Array;
for (var i = 0; i <= count; ++i)
manyHellosArray[i] = "hello";
var manyBracketsRegExp = new RegExp(regexp);
shouldBe("'hello'.match(manyBracketsRegExp)", "manyHellosArray");
debug('');
var successfullyParsed = true;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment