[PATCH] covoar: Fix single-byte uncovered ranges
Alex White
alex.white at oarcorp.com
Wed Jun 2 14:29:25 UTC 2021
This fixes a bug where covoar reports uncovered ranges of size 1. When a
NOP instruction is encountered at the end of a function, the remaining
non-instruction bytes are marked as executed. The loop that marks the
remaining bytes as executed was not considering the last address of the
function.
Closes #4448
---
tester/covoar/DesiredSymbols.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/DesiredSymbols.cc
index 2866dbe..75ec76f 100644
--- a/tester/covoar/DesiredSymbols.cc
+++ b/tester/covoar/DesiredSymbols.cc
@@ -252,7 +252,7 @@ namespace Coverage {
do {
theCoverageMap->setWasExecuted( ha );
ha++;
- if ( ha >= endAddress )
+ if ( ha > endAddress )
break;
} while ( !theCoverageMap->isStartOfInstruction( ha ) ||
theCoverageMap->isNop( ha ) );
--
2.27.0
More information about the devel
mailing list