Ignore:
Timestamp:
Aug 16, 2009, 6:14:33 AM (16 years ago)
Author:
[email protected]
Message:

2009-08-16 Holger Hans Peter Freyther <[email protected]>

Reviewed by Mark Rowe.

Fix crash on ./ecma_2/RegExp/exec-002.js.
https://bugs.webkit.org/show_bug.cgi?id=28353

Change the order of freeParenthesesDisjunctionContext and
popParenthesesDisjunctionContext on all call sites as the pop
method is accessing backTrack->lastContext which is the context
that is about to be freed.

  • yarr/RegexInterpreter.cpp: (JSC::Yarr::Interpreter::parenthesesDoBacktrack): (JSC::Yarr::Interpreter::backtrackParentheses):
File:
1 edited

Legend:

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

    r47337 r47338  
    609609
    610610            resetMatches(term, context);
     611            popParenthesesDisjunctionContext(backTrack);
    611612            freeParenthesesDisjunctionContext(context);
    612             popParenthesesDisjunctionContext(backTrack);
    613613        }
    614614
     
    911911            } else {
    912912                resetMatches(term, context);
     913                popParenthesesDisjunctionContext(backTrack);
    913914                freeParenthesesDisjunctionContext(context);
    914                 popParenthesesDisjunctionContext(backTrack);
    915915            }
    916916
     
    950950                // pop a match off the stack
    951951                resetMatches(term, context);
     952                popParenthesesDisjunctionContext(backTrack);
    952953                freeParenthesesDisjunctionContext(context);
    953                 popParenthesesDisjunctionContext(backTrack);
    954954            }
    955955
Note: See TracChangeset for help on using the changeset viewer.