v8/test
Jakob Gruber dd580e8fdf [regexp] Fix sticky callable replace with OOB lastIndex
When given a sticky regexp s.t. lastIndex > subject.length, the
following should happen:

1. exec returns null (= no match)
2. lastIndex is reset to 0.

This is usually done by the RegExp.p.exec builtin; but in some cases
we take different paths and try to re-implement the parts of exec that
we need.

One of these cases was in %StringReplaceNonGlobalRegExpWithFunction.
Here, we set lastIndex to 0 but then incorrectly called into
RegExpImpl::Exec. REI::Exec started matching with lastIndex == 0,
which is just plain wrong. With this CL we now correctly omit the
REI::Exec call and return null.

Bug: chromium:937681, v8:5361
Change-Id: I6bb1114a6b92ed3c6e63ec7f6ec2df4b95a19b4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1514679
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60169}
2019-03-11 16:09:47 +00:00
..
benchmarks [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
cctest Allocate feedback cells in an array decoupled from other slots 2019-03-11 11:20:21 +00:00
common Reland "[wasm] add wasm atomic wait callback test" 2019-02-20 05:17:07 +00:00
debugger [nojit] Auto-skip --opt tests in jitless mode 2019-03-06 12:45:17 +00:00
fuzzer [regexp-builtins-fuzzer] Print generated source in verbose mode 2019-03-08 11:40:41 +00:00
inspector [class] Expose private class fields in inspector protocol 2019-03-08 22:17:26 +00:00
intl [Intl] Fix special case timezone 2019-03-07 23:33:22 +00:00
js-perf-test Increase timeout for JSTests on arm64 2019-03-06 17:21:28 +00:00
memory [snapshot] Remove the builtins snapshot 2018-10-31 10:18:28 +00:00
message [fni] Mark computed props as computed, not anonymous function 2019-03-01 20:52:03 +00:00
mjsunit [regexp] Fix sticky callable replace with OOB lastIndex 2019-03-11 16:09:47 +00:00
mkgrokdump [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
mozilla [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
preparser [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
test262 [Intl] Fix Intl.getCanonicalLocales("mo") 2019-03-07 23:28:32 +00:00
torque [torque] Simplify class and struct construction 2019-02-27 17:36:37 +00:00
unittests Allocate feedback cells in an array decoupled from other slots 2019-03-11 11:20:21 +00:00
wasm-js [testrunner] handle timeout param in file 2019-02-27 17:49:17 +00:00
wasm-spec-tests [wasm] Update spec tests 2019-02-27 10:42:02 +00:00
webkit [test] Don't test jitless without embedded-builtins 2019-02-26 14:33:01 +00:00
BUILD.gn Add target for common test headers 2019-02-12 09:30:01 +00:00
OWNERS Make tmrts an infra OWNER 2019-02-15 09:02:24 +00:00