[webkit-changes] [WebKit/WebKit] 7ee275: [JSC] YarrPattern copyTerm can fail

Yusuke Suzuki noreply at github.com
Tue Jan 14 15:09:03 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 7ee275e0aed25635433924608ae6b1a1af47dc79
      https://github.com/WebKit/WebKit/commit/7ee275e0aed25635433924608ae6b1a1af47dc79
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2025-01-14 (Tue, 14 Jan 2025)

  Changed paths:
    A JSTests/stress/regexp-filter-starts-with-bol-do-not-crash.js
    M Source/JavaScriptCore/yarr/YarrPattern.cpp

  Log Message:
  -----------
  [JSC] YarrPattern copyTerm can fail
https://bugs.webkit.org/show_bug.cgi?id=285939
rdar://142478433

Reviewed by Yijia Huang.

copyTerm can filter out starts-with-bol cases. So it may return nullptr.
We should skip copying term when it is returning a nullptr.

* JSTests/stress/regexp-filter-starts-with-bol-do-not-crash.js: Added.
* Source/JavaScriptCore/yarr/YarrPattern.cpp:
(JSC::Yarr::YarrPatternConstructor::copyDisjunction):
(JSC::Yarr::YarrPatternConstructor::copyTerm):
(JSC::Yarr::YarrPatternConstructor::quantifyAtom):
(JSC::Yarr::YarrPatternConstructor::optimizeBOL):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list