• Jakob Gruber's avatar
    [regexp] Fix CharacterRange limits again again again · 2e17aaca
    Jakob Gruber authored
    When emitting code, character ranges must only specify ranges which
    the actual subject string (one- or two-byte) may contain.
    
    This was not always the case, specifically for ranges with
    `from <= kMaxUint8` and `to > kMaxUint8`.
    
    The reason this is so tricky: 1. not all parts of the pipeline know
    whether we are compiling for one- or two-byte subjects; 2. for
    case-insensitive regexps, an out-of-bounds CharacterRange may have an
    in-bounds case equivalent (e.g. /[Ÿ]/i also matches 'ÿ' == \u{ff}),
    which only gets added somewhere in the middle of the pipeline.
    
    Our current solution is to clamp immediately before code emission. We
    also keep the existing handling/dchecks of the 0x10ffff marker value
    which may occur in the two-byte subject case.
    
    Bug: v8:11069
    Change-Id: Ic7b34a13a900ea2aa3df032daac9236bf5682a42
    Fixed: chromium:1275096
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3306569
    Commit-Queue: Jakob Gruber <jgruber@chromium.org>
    Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#78186}
    2e17aaca
Name
Last commit
Last update
.github Loading commit data...
bazel Loading commit data...
build_overrides Loading commit data...
custom_deps Loading commit data...
docs Loading commit data...
gni Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.bazelrc Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.editorconfig Loading commit data...
.flake8 Loading commit data...
.git-blame-ignore-revs Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.mailmap Loading commit data...
.vpython Loading commit data...
.vpython3 Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.bazel Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
COMMON_OWNERS Loading commit data...
DEPS Loading commit data...
DIR_METADATA Loading commit data...
ENG_REVIEW_OWNERS Loading commit data...
INFRA_OWNERS Loading commit data...
INTL_OWNERS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LOONG_OWNERS Loading commit data...
MIPS_OWNERS Loading commit data...
OWNERS Loading commit data...
PPC_OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
RISCV_OWNERS Loading commit data...
S390_OWNERS Loading commit data...
WATCHLISTS Loading commit data...
WORKSPACE Loading commit data...
codereview.settings Loading commit data...