Bug 42664 - Simple lookahead hangs Yarr
Summary: Simple lookahead hangs Yarr
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Michael Saboff
URL: https://bugzilla.mozilla.org/show_bug...
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-20 14:01 PDT by Oliver Hunt
Modified: 2010-12-06 14:06 PST (History)
5 users (show)

See Also:


Attachments
Patch to fix hang and add a new regression test. (5.82 KB, patch)
2010-07-29 14:06 PDT, Michael Saboff
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2010-07-20 14:01:29 PDT
From mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=576811

/(?:(?=x))+/.exec("x")

Hangs in JIT code under JSC::Yarr::RegexCodeBlock::execute.
Comment 1 Michael Saboff 2010-07-29 14:06:58 PDT
Created attachment 62990 [details]
Patch to fix hang and add a new regression test.

Added check to jit code to only try to match more if some input was consumed in the current match.

Also added some new test cases to check for regressions.
Comment 2 WebKit Commit Bot 2010-07-29 14:33:30 PDT
Comment on attachment 62990 [details]
Patch to fix hang and add a new regression test.

Clearing flags on attachment: 62990

Committed r64307: <http://trac.webkit.org/changeset/64307>
Comment 3 WebKit Commit Bot 2010-07-29 14:33:34 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Yael 2010-12-06 13:40:10 PST
Ademar, can you please cherry-pick this to QtWebKit 2.1?
I think it will fix https://qtrequirements.europe.nokia.com/browse/BR-4872 .
thanks!
Comment 5 Ademar Reis 2010-12-06 14:06:09 PST
Revision r64307 cherry-picked into qtwebkit-2.1 with commit df5e090 <http://gitorious.org/webkit/qtwebkit/commit/df5e090>