[webkit-changes] [WebKit/WebKit] ce7674: [JSC] DFG strcat should handle OOM thrown from ToS...

Yusuke Suzuki noreply at github.com
Fri Sep 16 14:40:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ce7674d47d3cb9a16aa9eaf647dbb25531c3719d
      https://github.com/WebKit/WebKit/commit/ce7674d47d3cb9a16aa9eaf647dbb25531c3719d
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-09-16 (Fri, 16 Sep 2022)

  Changed paths:
    A JSTests/stress/strcat-bigint-oom.js
    M Source/JavaScriptCore/dfg/DFGOperations.cpp

  Log Message:
  -----------
  [JSC] DFG strcat should handle OOM thrown from ToString(BigInt)
https://bugs.webkit.org/show_bug.cgi?id=245287
<rdar://99270573>

Reviewed by Alexey Shvayka.

Our original assumption was that there is no way to throw an error from ToString(primitive-except-symbol).
But this is not true since we can generate super large BigInt and ToString(BigInt) can cause OOM.
This patch makes DFG / FTL strcat operations to handle this error correctly.
LLInt / Baseline already handle it.

* JSTests/stress/strcat-bigint-oom.js: Added.
(foo):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

Canonical link: https://commits.webkit.org/254570@main




More information about the webkit-changes mailing list