* pcre/pcre_compile.cpp: Change errorcode to be passed by reference so that any error code is propagated
to our caller like they expect.
Reviewed by Dan Bernstein.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28018
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2007-11-25 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Fix http://bugs.webkit.org/show_bug.cgi?id=16129
+ Bug 16129: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build)
+
+ * pcre/pcre_compile.cpp: Change errorcode to be passed by reference so that any error code is propagated
+ to our caller like they expect.
+
2007-11-23 Kevin Ollivier <kevino@theolliviers.com>
MSVC7 build fix. (rand_s doesn't exist there)
return c;
}
-static int calculateCompiledPatternLengthAndFlags(const pcre_char* pattern, int patternLength, JSRegExpIgnoreCaseOption ignoreCase, compile_data& compile_block, ErrorCode errorcode)
+static int calculateCompiledPatternLengthAndFlags(const pcre_char* pattern, int patternLength, JSRegExpIgnoreCaseOption ignoreCase, compile_data& compile_block, ErrorCode& errorcode)
{
/* Make a pass over the pattern to compute the
amount of store required to hold the compiled code. This does not have to be
+2007-11-25 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Test for http://bugs.webkit.org/show_bug.cgi?id=16129
+ Bug 16129: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build)
+
+ * fast/js/regexp-range-out-of-order-expected.txt: Added.
+ * fast/js/regexp-range-out-of-order.html: Added.
+ * fast/js/resources/regexp-range-out-of-order.js: Added.
+
2007-11-25 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by Adam Roben.
--- /dev/null
+Test for bug 16129: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS /^[s{-.[]()]$/ threw exception SyntaxError: Invalid regular expression: range out of order in character class.
+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-range-out-of-order.js"></script>
+<script src="resources/js-test-post.js"></script>
+</body>
+</html>
--- /dev/null
+description(
+
+'Test for <a href="http://bugs.webkit.org/show_bug.cgi?id=16129">bug 16129</a>: REGRESSION (r27761-r27811): malloc error while visiting http://mysit.es (crashes release build).'
+
+);
+
+shouldThrow('/^[\s{-.\[\]\(\)]$/');
+
+var successfullyParsed = true;