Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: d96ab2fa64c62763be711bb60f3a239c62ebe25f https://github.com/WebKit/WebKit/commit/d96ab2fa64c62763be711bb60f3a239c62ebe25f Author: Robert Jenner <jen...@apple.com> Date: 2025-08-18 (Mon, 18 Aug 2025)
Changed paths: M Source/JavaScriptCore/yarr/YarrJIT.cpp Log Message: ----------- [YARR] Remove sentinel-based tracking in Unicode read path https://bugs.webkit.org/show_bug.cgi?id=294182 rdar://152806201 Reviewed by Yusuke Suzuki. Simplified the logic for tracking additional read size when handling Unicode characters in Yarr JIT. Previously, a sentinel-based mechanism (0x4) was used to indicate whether a non-BMP character had been read. This approach required conditional logic that could silently fail in edge cases like skipped alternatives or control flow changes during backtracking. This patch: - Removes the sentinel mechanism entirely. - Initializes firstCharacterAdditionalReadSize to 0 on alternative entry. - Always sets it to 1 when reading a non-BMP character, 0 otherwise. - Removes all conditional writes and checks for the sentinel. This change ensures the additional read size is always well-defined and simplifies the backtracking and match start logic. It improves robustness and correctness in Unicode mode without changing observable RegExp semantics. * Source/JavaScriptCore/yarr/YarrJIT.cpp: Originally-landed-as: 289651.563@safari-7621-branch (01d3edddfa1a). rdar://157789826 Canonical link: https://commits.webkit.org/298874@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes