[rtems-tools commit] covoar: Fix single-byte uncovered ranges

Joel Sherrill joel at rtems.org
Fri Jun 4 19:25:11 UTC 2021


Module:    rtems-tools
Branch:    master
Commit:    c17664fb7b95f16e7012e4bbcbfd301e7a58b3a8
Changeset: http://git.rtems.org/rtems-tools/commit/?id=c17664fb7b95f16e7012e4bbcbfd301e7a58b3a8

Author:    Alex White <alex.white at oarcorp.com>
Date:      Wed Jun  2 09:22:51 2021 -0500

covoar: Fix single-byte uncovered ranges

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 5278891..caa6acd 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 ) );



More information about the vc mailing list