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: fix Segmentation fault in ShowCache::handleCacheEvent #4328
Date Tue, 09 Oct 2018 17:21:08 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 616eb10  fix Segmentation fault in ShowCache::handleCacheEvent #4328
616eb10 is described below

commit 616eb10bfc35599a2c93ff30879d584a05ddf83e
Author: zhang <15535135608@163.com>
AuthorDate: Fri Sep 28 16:45:15 2018 +0800

    fix Segmentation fault in ShowCache::handleCacheEvent #4328
---
 iocore/cache/CachePages.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc
index 4578c4b..089cb59 100644
--- a/iocore/cache/CachePages.cc
+++ b/iocore/cache/CachePages.cc
@@ -337,6 +337,13 @@ ShowCache::handleCacheEvent(int event, Event *e)
     CacheHTTPInfoVector *vec = &(cache_vc->vector);
     int alt_count            = vec->count();
     if (alt_count) {
+      // check cache_vc->first_buf is NULL, response cache lookup busy.
+      if (cache_vc->first_buf == nullptr) {
+        cache_vc->do_io_close(-1);
+        CHECK_SHOW(show("<H3>Cache Lookup Busy, please try again</H3>\n"));
+        return complete(event, e);
+      }
+
       Doc *d = (Doc *)(cache_vc->first_buf->data());
       time_t t;
       char tmpstr[4096];


Mime
View raw message