From a9fa9429d51098c73e769b2b504798d8560dde54 Mon Sep 17 00:00:00 2001 From: Harikrishnan Mulackal Date: Fri, 15 May 2020 20:46:50 +0530 Subject: [PATCH] Fixed bug in BlockDeDuplicator --- libevmasm/BlockDeduplicator.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libevmasm/BlockDeduplicator.cpp b/libevmasm/BlockDeduplicator.cpp index 9a26db8ca..decfee650 100644 --- a/libevmasm/BlockDeduplicator.cpp +++ b/libevmasm/BlockDeduplicator.cpp @@ -113,6 +113,10 @@ bool BlockDeduplicator::applyTagReplacement( if (subId != _subId) continue; auto it = _replacements.find(tagId); + // Recursively look for the element replaced by tagId + for (auto _it = it; _it != _replacements.end(); _it = _replacements.find(_it->second)) + it = _it; + if (it != _replacements.end()) { changed = true;