Reviewed by Mitz.
- fix http://bugs.webkit.org/show_bug.cgi?id=16096
REGRESSION (r26653-r26699): Plaxo.com addressbook does not load in webkit nightlies
Test: fast/js/regexp-overflow.html
* pcre/pcre_compile.cpp: (calculateCompiledPatternLengthAndFlags):
Removed a stray "ptr++" that I added by accident when merging the
changes between PCRE 6.4 and 6.5.
LayoutTests:
Reviewed by Mitz.
- test for http://bugs.webkit.org/show_bug.cgi?id=16096
REGRESSION (r26653-r26699): Plaxo.com addressbook does not load in webkit nightlies
* fast/js/regexp-overflow-expected.txt: Added.
* fast/js/regexp-overflow.html: Added.
* fast/js/resources/regexp-overflow.js: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28058
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - fix http://bugs.webkit.org/show_bug.cgi?id=16096
+ REGRESSION (r26653-r26699): Plaxo.com addressbook does not load in webkit nightlies
+
+ Test: fast/js/regexp-overflow.html
+
+ * pcre/pcre_compile.cpp: (calculateCompiledPatternLengthAndFlags):
+ Removed a stray "ptr++" that I added by accident when merging the
+ changes between PCRE 6.4 and 6.5.
+
2007-11-26 Geoffrey Garen <ggaren@apple.com>
Reviewed by Kevin McCullough.
(min == 1 && max == -1))
length++;
else length += 5;
- if (ptr[1] == '?') ptr++;
- ptr++;
+ if (ptr[1] == '?')
+ ptr++;
}
}
continue;
+2007-11-26 Darin Adler <darin@apple.com>
+
+ Reviewed by Mitz.
+
+ - test for http://bugs.webkit.org/show_bug.cgi?id=16096
+ REGRESSION (r26653-r26699): Plaxo.com addressbook does not load in webkit nightlies
+
+ * fast/js/regexp-overflow-expected.txt: Added.
+ * fast/js/regexp-overflow.html: Added.
+ * fast/js/resources/regexp-overflow.js: Added.
+
2007-11-26 Sam Weinig <sam@webkit.org>
Reviewed by Darin.
--- /dev/null
+Tests some regular expressions with braces in them that used to overflow the regular expression compilation preflight computation.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS /(\d)(\1{1})/.exec("11").toString() is "11,1,1"
+PASS /^(\d{1,2})([ -:\/\.]{1})(\d{1,2})(\2{1})?(\d{2,4})?$/.exec("1:1").toString() is "1:1,1,:,1,,"
+PASS /^(\d{4})([ -:\/\.]{1})(\d{1,2})(\2{1})(\d{1,2})T(\d{1,2})([ -:\/\.]{1})(\d{1,2})(\7{1})(\d{1,2})Z$/.exec("1234:5:6T7/8/9Z").toString() is "1234:5:6T7/8/9Z,1234,:,5,:,6,7,/,8,/,9"
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
--- /dev/null
+<!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-overflow.js"></script>
+<script src="resources/js-test-post.js"></script>
+</body>
+</html>
--- /dev/null
+description(
+'Tests some regular expressions with braces in them that used to overflow the regular expression compilation preflight computation.'
+);
+
+shouldBe('/(\\d)(\\1{1})/.exec("11").toString()', '"11,1,1"');
+shouldBe('/^(\\d{1,2})([ -:\\/\\.]{1})(\\d{1,2})(\\2{1})?(\\d{2,4})?$/.exec("1:1").toString()', '"1:1,1,:,1,,"');
+shouldBe('/^(\\d{4})([ -:\\/\\.]{1})(\\d{1,2})(\\2{1})(\\d{1,2})T(\\d{1,2})([ -:\\/\\.]{1})(\\d{1,2})(\\7{1})(\\d{1,2})Z$/.exec("1234:5:6T7/8/9Z").toString()', '"1234:5:6T7/8/9Z,1234,:,5,:,6,7,/,8,/,9"');
+
+debug('');
+
+var successfullyParsed = true;