JitCache: Also unlink exits of the current block.

We might still be in the current block. This is fine, but the next one might also be invalidated later on. But we may never also call the next one.
This commit is contained in:
degasus 2017-02-27 23:46:24 +01:00
parent c1ddc2678e
commit ffa61fcf57

View File

@ -315,8 +315,14 @@ void JitBaseBlockCache::LinkBlock(JitBlock& block)
void JitBaseBlockCache::UnlinkBlock(const JitBlock& block)
{
auto ppp = links_to.equal_range(block.effectiveAddress);
// Unlink all exits of this block.
for (auto& e : block.linkData)
{
WriteLinkBlock(e, nullptr);
}
// Unlink all exits of other blocks which points to this block
auto ppp = links_to.equal_range(block.effectiveAddress);
for (auto iter = ppp.first; iter != ppp.second; ++iter)
{
JitBlock& sourceBlock = *iter->second;