Ignore:
Timestamp:
Jul 2, 2010, 9:45:41 AM (15 years ago)
Author:
[email protected]
Message:

2010-07-02 Peter Varga <[email protected]>

Reviewed by Oliver Hunt.

The alternativeFrameLocation value is wrong in the emitDisjunction function in
case of PatternTerm::TypeParentheticalAssertion. This value needs to be
computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
memory corruption in some cases.
Layout test added for checking of TypeParentheticalAssertion case.
https://bugs.webkit.org/show_bug.cgi?id=41458

  • yarr/RegexInterpreter.cpp: (JSC::Yarr::ByteCompiler::emitDisjunction):

2010-07-02 Peter Varga <[email protected]>

Reviewed by Oliver Hunt.

The alternativeFrameLocation value is wrong in the emitDisjunction function in
case of PatternTerm::TypeParentheticalAssertion. This value needs to be
computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
memory corruption in some cases.
Layout test added for checking of TypeParentheticalAssertion case.
https://bugs.webkit.org/show_bug.cgi?id=41458

  • fast/js/regexp-look-ahead-expected.txt: Added.
  • fast/js/regexp-look-ahead.html: Added.
  • fast/js/script-tests/regexp-look-ahead.js: Added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/yarr/RegexInterpreter.cpp

    r59766 r62386  
    15551555
    15561556                case PatternTerm::TypeParentheticalAssertion: {
    1557                     unsigned alternativeFrameLocation = term.inputPosition + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
     1557                    unsigned alternativeFrameLocation = term.frameLocation + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
    15581558
    15591559                    atomParentheticalAssertionBegin(term.parentheses.subpatternId, term.invertOrCapture, term.frameLocation, alternativeFrameLocation);
Note: See TracChangeset for help on using the changeset viewer.