[ubsan][regexp] Avoid out-of-range casts from int to enum Result
NativeRegExpMacroAssembler::Match() can return either a Result sentinel or an int indicating the number of matches, so it should return a plain int which we can only safely cast to Result or IrregexpResult when it's guaranteed to be the former case. Bug: v8:3770 Change-Id: I4c3447e0cdebd5f825964e086574ab504a1799cd Reviewed-on: https://chromium-review.googlesource.com/c/1435735Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#59142}
Showing
Please
register
or
sign in
to comment