WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159529
Unexpected "Out of memory" error for "x".repeat(-1)
https://bugs.webkit.org/show_bug.cgi?id=159529
Summary
Unexpected "Out of memory" error for "x".repeat(-1)
Joseph Pecoraro
Reported
2016-07-07 15:34:11 PDT
Summary: Unexpected "Out of memory" error for "x".repeat(-1) Steps to Reproduce:
>>> "x".repeat(-1)
Exception: Error: Out of memory
>>> "xx".repeat(-1)
Exception: RangeError: String.prototype.repeat argument must be greater than or equal to 0 and not be infinity Notes: Seems like the single character optimization path doesn't properly handle negative numbers!
Attachments
[PATCH] Proposed Fix
(10.30 KB, patch)
2016-07-07 17:20 PDT
,
Joseph Pecoraro
benjamin
: review+
benjamin
: commit-queue-
Details
Formatted Diff
Diff
[PATCH] Proposed Fix
(15.49 KB, patch)
2016-07-07 19:42 PDT
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2016-07-07 17:10:12 PDT
<
https://tc39.github.io/ecma262/#sec-string.prototype.repeat
>
Joseph Pecoraro
Comment 2
2016-07-07 17:20:12 PDT
Created
attachment 283094
[details]
[PATCH] Proposed Fix
Benjamin Poulain
Comment 3
2016-07-07 19:20:26 PDT
Comment on
attachment 283094
[details]
[PATCH] Proposed Fix cq-, I have been discussing this with Joe, he has plenty of improvements.
Joseph Pecoraro
Comment 4
2016-07-07 19:42:16 PDT
Created
attachment 283100
[details]
[PATCH] Proposed Fix
WebKit Commit Bot
Comment 5
2016-07-07 20:13:49 PDT
Comment on
attachment 283100
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 283100 Committed
r202954
: <
http://trac.webkit.org/changeset/202954
>
WebKit Commit Bot
Comment 6
2016-07-07 20:13:53 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug