diff options
author | Alex White <alex.white@oarcorp.com> | 2021-02-26 17:11:06 -0600 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2021-03-30 13:15:58 -0500 |
commit | 917469b2d3bdcf9186b1cbeccdd85361a1ce5d4e (patch) | |
tree | 5774ef78c8fcbdfb752ac08b02d8a99d7100634a /tester/covoar | |
parent | covoar: Catch exceptional case (diff) | |
download | rtems-tools-917469b2d3bdcf9186b1cbeccdd85361a1ce5d4e.tar.bz2 |
covoar: Fix overflow of high PC address
This fixes an integer overflow that would occur if a function's high PC
address were zero in the DWARF info.
Diffstat (limited to 'tester/covoar')
-rw-r--r-- | tester/covoar/ExecutableInfo.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tester/covoar/ExecutableInfo.cc b/tester/covoar/ExecutableInfo.cc index b75d0b5..fc368ce 100644 --- a/tester/covoar/ExecutableInfo.cc +++ b/tester/covoar/ExecutableInfo.cc @@ -71,6 +71,11 @@ namespace Coverage { } } + // We can't process a zero size function. + if (func.pc_high() == 0) { + continue; + } + createCoverageMap (cu.name(), func.name(), func.pc_low(), func.pc_high() - 1); } |