Skip to content

Commit d20a32b

Browse files
GeorgNeismibrunin
authored andcommitted
[Backport] CVE-2021-30563: Type Confusion in V8
Manual backport of patch originally reviewed on https://chromium-review.googlesource.com/c/v8/v8/+/3027260: Merged: [compiler] Fix a bug in CodeGenerator::AddTranslationForOperand (cherry picked from commit 374354bfe4a30740b96936b33e522d6fcd1cda67) Bug: chromium:1228407 No-Try: true No-Presubmit: true No-Tree-Checks: true Change-Id: I358d8736b7b5f87300496cbb39a7689d8207d85f Bot-Commit: Rubber Stamper <[email protected]> Reviewed-by: Adam Klein <[email protected]> Commit-Queue: Adam Klein <[email protected]> Cr-Commit-Position: refs/branch-heads/9.1@{#77} Cr-Branched-From: 0e4ac64a8cf298b14034a22f9fe7b085d2cb238d-refs/heads/9.1.269@{#1} Cr-Branched-From: f565e72d5ba88daae35a59d0f978643e2343e912-refs/heads/master@{#73847} Reviewed-by: Michal Klocek <[email protected]>
1 parent 82dbe6e commit d20a32b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chromium/v8/src/compiler/backend/code-generator.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,8 @@ void CodeGenerator::AddTranslationForOperand(Translation* translation,
13061306
default:
13071307
UNREACHABLE();
13081308
}
1309-
if (literal.object().equals(info()->closure())) {
1309+
if (literal.object().equals(info()->closure()) &&
1310+
info()->function_context_specializing()) {
13101311
translation->StoreJSFrameFunction();
13111312
} else {
13121313
int literal_id = DefineDeoptimizationLiteral(literal);

0 commit comments

Comments
 (0)