[runtime-test] EnsureFeedbackVector in Runtime_OptimizeOsr

With lazy feedback allocaiton functions may not have feedback vectors.
This causes crashes with clusterfuzz when it uses OptimizeOSR without
ensuring feedback vector. This cl ensures we have a feedback vector
before OSRing.

Bug: v8:8394
Change-Id: I5470c45cec2f6916d142f3bb4a385737083de25c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1611809
Auto-Submit: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61568}
This commit is contained in:
Mythri A 2019-05-15 17:21:14 +01:00 committed by Commit Bot
parent 8e68a1fc5f
commit 8f70453012

View File

@ -447,6 +447,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) {
function->ShortPrint();
PrintF(" for non-concurrent optimization]\n");
}
JSFunction::EnsureFeedbackVector(function);
function->MarkForOptimization(ConcurrencyMode::kNotConcurrent);
// Make the profiler arm all back edges in unoptimized code.