WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
proposed patch
0001-backref.patch (text/plain), 2.00 KB, created by
Peter Varga
on 2010-09-30 08:45:11 PDT
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Peter Varga
Created:
2010-09-30 08:45:11 PDT
Size:
2.00 KB
patch
obsolete
>From 252a92e9c514e17799829dea8bc62529c292d597 Mon Sep 17 00:00:00 2001 >From: Peter Varga <pvarga@inf.u-szeged.hu> >Date: Thu, 30 Sep 2010 08:43:26 -0700 >Subject: [PATCH] backref > >--- > JavaScriptCore/ChangeLog | 13 +++++++++++++ > JavaScriptCore/yarr/RegexInterpreter.cpp | 7 +++++++ > 2 files changed, 20 insertions(+), 0 deletions(-) > >diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog >index e793955..42ac98f 100644 >--- a/JavaScriptCore/ChangeLog >+++ b/JavaScriptCore/ChangeLog >@@ -1,5 +1,18 @@ > 2010-09-30 Peter Varga <pvarga@inf.u-szeged.hu> > >+ Reviewed by NOBODY (OOPS!). >+ >+ 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-09-30 Peter Varga <pvarga@inf.u-szeged.hu> >+ > Reviewed by Gavin Barraclough. > > The case-insensitivity backreference checking isn't working with YARR >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); > >-- >1.7.2.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 46904
: 69338