trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] branch master updated: clang analzyer - fix false positive in Vol::handle_recover_from_data.
Date Wed, 15 May 2019 21:04:23 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 554c828  clang analzyer - fix false positive in Vol::handle_recover_from_data.
554c828 is described below

commit 554c828ae2c5cc657e665d202fbe9290582e5efa
Author: Alan M. Carroll <amc@apache.org>
AuthorDate: Wed May 15 14:27:55 2019 -0500

    clang analzyer - fix false positive in Vol::handle_recover_from_data.
---
 iocore/cache/Cache.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 98eb09b..cd2668e 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -1490,6 +1490,9 @@ Vol::handle_recover_from_data(int event, void * /* data ATS_UNUSED */)
       }
     }
 
+    // If execution reaches here, then @c got_len > 0 and e == s + got_len therefore s
< e
+    // clang analyzer can't figure this out, so be explicit.
+    ink_assert(s < e);
     while (s < e) {
       doc = (Doc *)s;
 


Mime
View raw message