Summary: | RegExp's anchored with .* with \g flag can return wrong match start for strings with multiple matches | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> | ||||
Component: | JavaScriptCore | Assignee: | Michael Saboff <msaboff> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | bfulgham, buildbot, keith_miller, mark.lam, oliver, saam, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Michael Saboff
2017-06-30 14:48:13 PDT
Created attachment 314302 [details]
Patch
Comment on attachment 314302 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=314302&action=review > Source/JavaScriptCore/yarr/YarrJIT.cpp:2699 > + if (m_pattern.m_saveInitialStartValue) { > +#ifdef HAVE_INITIAL_START_REG > + move(index, initialStart); > +#else > + storeToFrame(index, m_pattern.m_initialStartValueFrameLocation); > +#endif I almost wish we could bludgeon templates into doing this for us. Almost. (I suspect it would turn into "can I implement register allocation with templates at compile time?" questions :D ) Committed r219031: <http://trac.webkit.org/changeset/219031> |