[PATCH 1/3] covoar: Catch exceptional case

Alex White alex.white at oarcorp.com
Tue Mar 30 15:20:05 UTC 2021


ping

On Fri, Mar 12, 2021 at 11:14 AM Alex White <alex.white at oarcorp.com> wrote:
>
> ---
>  tester/covoar/ExecutableInfo.cc | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/tester/covoar/ExecutableInfo.cc b/tester/covoar/ExecutableInfo.cc
> index 187bb77..5a730fd 100644
> --- a/tester/covoar/ExecutableInfo.cc
> +++ b/tester/covoar/ExecutableInfo.cc
> @@ -201,6 +201,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 );
> --
> 2.27.0
>
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel


More information about the devel mailing list