[Webkit-unassigned] [Bug 103825] New: [ES5.1 - 15.10.6.2] RegExp.prototype.exec(string), step 5 "ToInteger(lastIndex)" not always executed
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Dec 1 17:35:08 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=103825
Summary: [ES5.1 - 15.10.6.2] RegExp.prototype.exec(string),
step 5 "ToInteger(lastIndex)" not always executed
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: andre.bargull at gmail.com
Step 5 of [ES5.1 - 15.10.6.2] RegExp.prototype.exec(string) must always be executed due to side effects. This affects not only plain calls to RegExp.prototype.exec, but also RegExp.prototype.test, String.prototype.match and String.prototype.replace, because these functions call directly or indirectly RegExp.prototype.exec.
List of different javascript engines/browsers and the result for each test:
---
r = /a/; r.lastIndex = {valueOf: function(){throw "err"}}; r.exec("zzzz");
Bad: JSC, IE
Good: V8, SM, Opera
r = /a/; r.lastIndex = {valueOf: function(){throw "err"}}; r.test("zzzz");
Bad: JSC, IE, Opera
Good: V8, SM
r = /a/; r.lastIndex = {valueOf: function(){throw "err"}}; "zzzz".match(r);
Bad: JSC, IE, V8, SM
Good: Opera
r = /a/; r.lastIndex = {valueOf: function(){throw "err"}}; "zzzz".replace(r, "");
Bad: JSC, IE, V8, SM, Opera
Good: -
---
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list