block_of_code: Add santiy check that far_code_offset < total_code_size

This commit is contained in:
MerryMage 2021-04-21 18:26:26 +01:00
parent 08ed8b4a11
commit 5bec200c36

View file

@ -81,6 +81,7 @@ BlockOfCode::BlockOfCode(RunCodeCallbacks cb, JitStateInfo jsi, size_t total_cod
, far_code_offset(far_code_offset)
, constant_pool(*this, CONSTANT_POOL_SIZE)
{
ASSERT(total_code_size > far_code_offset);
EnableWriting();
GenRunCode(rcp);
}