[Webkit-unassigned] [Bug 258559] New: regExpProtoFuncExec and operationRegExpExecGeneric throw different messages when thisObject is not a RegExp object

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 27 04:57:47 PDT 2023


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

            Bug ID: 258559
           Summary: regExpProtoFuncExec and  operationRegExpExecGeneric
                    throw different messages when thisObject is not a
                    RegExp object
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ChristineWillice at gmail.com

``````test.js``````

for (let v0 = 0; v0 < 40; v0++) {
    let v16 = RegExp.prototype
    try {
      v16.test();
    } catch (e23) {
      print(e23)
    }
  }

```````````````````

Run args: ./jsc  -f test.js --useConcurrentJIT=0 --jitPolicyScale=0

Output:
TypeError: Builtin RegExp exec can only be called on a RegExp object
TypeError: Builtin RegExp exec can only be called on a RegExp object
TypeError: Builtin RegExp exec can only be called on a RegExp object
TypeError: Builtin RegExp exec can only be called on a RegExp object
TypeError: Builtin RegExp exec can only be called on a RegExp object
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error
TypeError: Type error

When thisObject is not a RegExp object:

In RegExpPrototype.cpp, regExpProtoFuncExec throw `Builtin RegExp exec can only be called on a RegExp object`,

In DFGOperations.cpp, operationRegExpExecGeneric throw `Type error`.

-- 
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/20230627/798710dd/attachment.htm>


More information about the webkit-unassigned mailing list