[webkit-changes] cvs commit: WebCore/layout-tests/fast/js
regexp-big-unicode-ranges-expected.txt
regexp-big-unicode-ranges.html
Geoffrey
ggaren at opensource.apple.com
Fri Aug 5 13:44:41 PDT 2005
ggaren 05/08/05 13:44:40
Modified: . ChangeLog
pcre pcre.c
. ChangeLog
Added: layout-tests/fast/js regexp-big-unicode-ranges-expected.txt
regexp-big-unicode-ranges.html
Log:
Revision Changes Path
1.773 +15 -0 JavaScriptCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/JavaScriptCore/ChangeLog,v
retrieving revision 1.772
retrieving revision 1.773
diff -u -r1.772 -r1.773
--- ChangeLog 5 Aug 2005 03:51:43 -0000 1.772
+++ ChangeLog 5 Aug 2005 20:44:35 -0000 1.773
@@ -1,3 +1,18 @@
+2005-08-05 Geoffrey Garen <ggaren at apple.com>
+
+ Fix by darin, reviewed by me.
+
+ - rolled in fix for: <rdar://problem/4161606> JavaScript regular
+ expressions with certain ranges of Unicode characters cause a crash
+
+ Test cases added:
+
+ * layout-tests/fast/js/regexp-big-unicode-ranges-expected.txt: Added.
+ * layout-tests/fast/js/regexp-big-unicode-ranges.html: Added.
+
+ * pcre/pcre.c:
+ (compile_branch): added checks for characters > 255
+
2005-08-04 Maciej Stachowiak <mjs at apple.com>
- updated expected test results now that we no longer exlude the
1.5 +16 -2 JavaScriptCore/pcre/pcre.c
Index: pcre.c
===================================================================
RCS file: /cvs/root/JavaScriptCore/pcre/pcre.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- pcre.c 21 Jun 2005 23:02:19 -0000 1.4
+++ pcre.c 5 Aug 2005 20:44:36 -0000 1.5
@@ -1184,7 +1184,14 @@
*errorptr = ERR6;
goto FAILED;
}
-
+#if PCRE_UTF16
+ if (c > 255)
+ {
+ *errorptr = ERR33;
+ goto FAILED;
+ }
+#endif
+
/* Handle POSIX class names. Perl allows a negation extension of the
form [:^name]. A square bracket that doesn't match the syntax is
treated as a literal. We also recognize the POSIX constructions
@@ -1320,7 +1327,14 @@
*errorptr = ERR6;
goto FAILED;
}
-
+#if PCRE_UTF16
+ if (d > 255)
+ {
+ *errorptr = ERR33;
+ goto FAILED;
+ }
+#endif
+
/* The second part of a range can be a single-character escape, but
not any of the other escapes. Perl 5.6 treats a hyphen as a literal
in such circumstances. */
1.4527 +10 -0 WebCore/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebCore/ChangeLog,v
retrieving revision 1.4526
retrieving revision 1.4527
diff -u -r1.4526 -r1.4527
--- ChangeLog 5 Aug 2005 18:36:25 -0000 1.4526
+++ ChangeLog 5 Aug 2005 20:44:36 -0000 1.4527
@@ -1,3 +1,13 @@
+2005-08-05 Geoffrey Garen <ggaren at apple.com>
+
+ -added layout test for fix to: <rdar://problem/4161606> JavaScript regular
+ expressions with certain ranges of Unicode characters cause a crash
+
+ Test cases added:
+
+ * layout-tests/fast/js/regexp-big-unicode-ranges-expected.txt: Added.
+ * layout-tests/fast/js/regexp-big-unicode-ranges.html: Added.
+
2005-08-05 David Hyatt <hyatt at apple.com>
Fix for bugzilla bug 4289, a regression from the QualifiedName landing. Make sure getNamedItemNS and
1.1 WebCore/layout-tests/fast/js/regexp-big-unicode-ranges-expected.txt
Index: regexp-big-unicode-ranges-expected.txt
===================================================================
This test checks for a regression against rdar://problem/4161606 JavaScript regular expressions with certain ranges of Unicode characters cause a crash.
If the test passes, you will see the word "PASSED" below. Otherwise, it will crash.
PASSED
1.1 WebCore/layout-tests/fast/js/regexp-big-unicode-ranges.html
Index: regexp-big-unicode-ranges.html
===================================================================
<html>
<head>
<script>
function print(message) {
var paragraph = document.createElement("p");
paragraph.appendChild(document.createTextNode(message));
document.getElementById("console").appendChild(paragraph);
}
function test() {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
}
var pattern;
// test ranges reported in bug
pattern = new RegExp("[\u00c0-\u1f4d]");
pattern = new RegExp("[\u3041-\u3094]");
pattern = new RegExp("[\u4d00-\u4db5]");
pattern = new RegExp("[\u4e00-\u9fa5]");
// test first char < 255, last char > 255
pattern = new RegExp("[\u0001-\u1f4d]");
print("PASSED");
}
</script>
</head>
<body onload="test();">
<p>This test checks for a regression against <i>rdar://problem/4161606 JavaScript regular expressions with certain ranges of Unicode characters cause a crash</i>.</p>
<p>If the test passes, you will see the word "PASSED" below. Otherwise, it will crash.</p>
<hr>
<div id='console'/>
</body>
</html>
More information about the webkit-changes
mailing list