[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:38:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit b5f05fa1970603024791cedba908eab03235797e
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Oct 14 18:00:55 2010 +0000
2010-10-14 Peter Varga <pvarga at inf.u-szeged.hu>
Reviewed by Gavin Barraclough.
The backreference checking isn't working in some cases with YARR Interpreter
https://bugs.webkit.org/show_bug.cgi?id=46904
The Interpreter::matchBackReference() function returns true without matching
when a backreference points to the same parentheses where it is.
* yarr/RegexInterpreter.cpp:
(JSC::Yarr::Interpreter::matchBackReference):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69781 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 0162e3e..afee301 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-14 Peter Varga <pvarga at inf.u-szeged.hu>
+
+ Reviewed by Gavin Barraclough.
+
+ The backreference checking isn't working in some cases with YARR Interpreter
+ https://bugs.webkit.org/show_bug.cgi?id=46904
+
+ The Interpreter::matchBackReference() function returns true without matching
+ when a backreference points to the same parentheses where it is.
+
+ * yarr/RegexInterpreter.cpp:
+ (JSC::Yarr::Interpreter::matchBackReference):
+
2010-10-14 No'am Rosenthal <noam.rosenthal at nokia.com>
Reviewed by Andreas Kling.
diff --git a/JavaScriptCore/yarr/RegexInterpreter.cpp b/JavaScriptCore/yarr/RegexInterpreter.cpp
index 1b3f620..efeae80 100644
--- a/JavaScriptCore/yarr/RegexInterpreter.cpp
+++ b/JavaScriptCore/yarr/RegexInterpreter.cpp
@@ -495,6 +495,13 @@ public:
int matchBegin = output[(term.atom.subpatternId << 1)];
int matchEnd = output[(term.atom.subpatternId << 1) + 1];
+
+ // If the end position of the referenced match hasn't set yet then the backreference in the same parentheses where it references to that.
+ // In this case the result of match is empty string like when it references to a parentheses with zero-width match.
+ // Eg.: /(a\1)/
+ if (matchEnd == -1)
+ return true;
+
ASSERT((matchBegin == -1) == (matchEnd == -1));
ASSERT(matchBegin <= matchEnd);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list