[Webkit-unassigned] [Bug 200070] New: Regular expression bug of javascriptCore: String search method invalid

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 23 18:27:17 PDT 2019


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

            Bug ID: 200070
           Summary: Regular expression bug of javascriptCore: String
                    search method invalid
           Product: WebKit
           Version: WebKit Local Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: yaohouyou at stumail.nwu.edu.cn

#Testcase:
1 var func = function() {
2     var reg = /(\w*)+=/;
3     var str1 = '4anything4654sASD:language=';
4     // var str2 = '4any4654sASD:language=';
5     print(str1.search(reg));
6     // print(str2.search(reg));
7 };
8 
9 func();

#Command:
./webkit/WebKitBuild/Release/bin/jsc testcase.js

#Output:
-1

#Expected output:
18

#Description:
When executing the above testcase, the expected output should be “18” according to ECMAScript-262 standard. However, JavaScriptCore outputs -1 while other JS engines such as V8, SpiderMonkey output “18”. In addition, when I comment str1(line 3) and use str2 (line 4), JavaScriptCore outputs “13”. So I suspect that it’s a bug of JavaScriptCore.

-- 
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/20190724/14f89d2a/attachment.html>


More information about the webkit-unassigned mailing list