[Webkit-unassigned] [Bug 187042] RegExp.exec returns wrong value with a long integer quantifier

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 1 09:43:13 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=187042

--- Comment #7 from Mark Lam <mark.lam at apple.com> ---
Comment on attachment 344050
  --> https://bugs.webkit.org/attachment.cgi?id=344050
Fix tests

View in context: https://bugs.webkit.org/attachment.cgi?id=344050&action=review

>>> Source/JavaScriptCore/yarr/YarrParser.h:987
>>> +            n = n * 10 + nextDigit;
>> 
>> Let’s just use Checked<unsigned> for n
> 
> We can then return UINT_MAX if that overflows

I pointed this out earlier (in https://bugs.webkit.org/show_bug.cgi?id=187042#c3): use Checked<unsigned, RecordOverflow >.  Plain Checked<unsigned> will crash on overflow, and I think we don't want that.
Also, use quantifyInfinite instead of UINT_MAX to be consistent with the rest of Yarr code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180701/c0b00936/attachment.html>


More information about the webkit-unassigned mailing list