Bug 46904 - The backreference checking isn't working in some cases with YARR Interpreter
Summary: The backreference checking isn't working in some cases with YARR Interpreter
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Peter Varga
URL:
Keywords:
Depends on:
Blocks: 46719
  Show dependency treegraph
 
Reported: 2010-09-30 08:38 PDT by Peter Varga
Modified: 2010-10-14 11:01 PDT (History)
5 users (show)

See Also:


Attachments
proposed patch (2.00 KB, patch)
2010-09-30 08:45 PDT, Peter Varga
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Varga 2010-09-30 08:38:24 PDT
The YARR Interpreter doesn't handle the case when a backreference points to the same parentheses where it is.
Therefore the YARR Interpreter causes assertion in debug mode and a regression in a JSC test.

Eg.:
"a".match(/(a\1)/;
result: ,
expected: a,a
Comment 1 Peter Varga 2010-09-30 08:45:11 PDT
Created attachment 69338 [details]
proposed patch
Comment 2 Gavin Barraclough 2010-10-14 10:41:05 PDT
Comment on attachment 69338 [details]
proposed patch

Nice fix, thank you!
Comment 3 WebKit Commit Bot 2010-10-14 11:01:12 PDT
Comment on attachment 69338 [details]
proposed patch

Clearing flags on attachment: 69338

Committed r69781: <http://trac.webkit.org/changeset/69781>
Comment 4 WebKit Commit Bot 2010-10-14 11:01:17 PDT
All reviewed patches have been landed.  Closing bug.