Commit 3dbc04f7 authored by jgruber's avatar jgruber Committed by Commit Bot

[regexp] Propagate exception to TryCatch in fuzzer

TryCatch only clears the pending exception if it has been propagated
through OptionalRescheduleException. This is another tentative fix for
https://crbug.com/754422.

Bug: chromium:754422
Change-Id: Ifbbeed8ef44131a0a010ac6bde3adbbf9fb4c4af
Reviewed-on: https://chromium-review.googlesource.com/637305Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47634}
parent 9be4b610
......@@ -19,7 +19,10 @@ void Test(v8::Isolate* isolate, i::Handle<i::JSRegExp> regexp,
i::Handle<i::String> subject,
i::Handle<i::RegExpMatchInfo> results_array) {
v8::TryCatch try_catch(isolate);
USE(i::RegExpImpl::Exec(regexp, subject, 0, results_array));
if (i::RegExpImpl::Exec(regexp, subject, 0, results_array).is_null()) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
i_isolate->OptionalRescheduleException(true);
}
}
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment