diff options
author | Alex White <alex.white@oarcorp.com> | 2021-02-25 11:08:36 -0600 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-03-30 13:15:58 -0500 |
commit | 9720218673da737d68dab5ba8903bee28abd5e25 (patch) | |
tree | a60ba435f14953e80fa747c00839f98fa832f928 /tester/covoar | |
parent | covoar: Fix null pointer dereference (diff) | |
download | rtems-tools-9720218673da737d68dab5ba8903bee28abd5e25.tar.bz2 |
covoar: Catch exceptional case
Diffstat (limited to 'tester/covoar')
-rw-r--r-- | tester/covoar/ExecutableInfo.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tester/covoar/ExecutableInfo.cc b/tester/covoar/ExecutableInfo.cc index 2fcacf2..b75d0b5 100644 --- a/tester/covoar/ExecutableInfo.cc +++ b/tester/covoar/ExecutableInfo.cc @@ -167,6 +167,16 @@ namespace Coverage { CoverageMapBase *theMap; CoverageMaps::iterator itr; + if ( lowAddress > highAddress ) { + std::ostringstream what; + what << "Low address is greater than high address for symbol " + << symbolName + << " (" << lowAddress + << " and " << highAddress + << ")"; + throw rld::error( what, "ExecutableInfo::createCoverageMap" ); + } + itr = coverageMaps.find( symbolName ); if ( itr == coverageMaps.end() ) { theMap = new CoverageMap( fileName, lowAddress, highAddress ); |