You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[regexp] Fix a possible off-by-one in Trace::cp_offset
.. which was itself guaranteed to be within kMinCPOffset and
kMaxCPOffset. But some callers then went on to subtract 1, therefore
exceeding kMinCPOffset.
Ideally, callers would check that their updated value is still in
bounds, and take appropriate action if not. But unfortunately, some
current callers (e.g. in RegExpMacroAssembler) *have* no appropriate
action, since they cannot abort.
So this CL instead takes the approach of adding a kCPOffsetSlack
instead, making the range checks in Trace stricter in order to allow
caller "misbehavior".
We also change cp_offset range DCHECKs into CHECKs since I'm not fully
convinced that we correctly observe bounds everywhere.
Fixed: 451663011
Change-Id: Ib50685d00a490a2959880bdd2fbeae5228a55997
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7037653
Reviewed-by: Patrick Thier <[email protected]>
Commit-Queue: Jakob Linke <[email protected]>
Cr-Commit-Position: refs/heads/main@{#103102}
0 commit comments