Skip to content

Commit 214dec9

Browse files
pleathatulkatti
authored andcommitted
[CVE-2019-1107] Chakra JIT Type Confusion FinishOptPropOp
1 parent 7f0d390 commit 214dec9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Backend/GlobOptFields.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,14 @@ GlobOpt::ProcessFieldKills(IR::Instr *instr, BVSparse<JitArenaAllocator> *bv, bo
410410
if (inGlobOpt)
411411
{
412412
KillObjectHeaderInlinedTypeSyms(this->currentBlock, false);
413+
if (this->objectTypeSyms)
414+
{
415+
if (this->currentBlock->globOptData.maybeWrittenTypeSyms == nullptr)
416+
{
417+
this->currentBlock->globOptData.maybeWrittenTypeSyms = JitAnew(this->alloc, BVSparse<JitArenaAllocator>, this->alloc);
418+
}
419+
this->currentBlock->globOptData.maybeWrittenTypeSyms->Or(this->objectTypeSyms);
420+
}
413421
}
414422

415423
// fall through

0 commit comments

Comments
 (0)