trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [2/3] trafficserver git commit: TS-3280: Segfault in new freelist bulk freeing
Date Sat, 10 Jan 2015 02:20:24 GMT
TS-3280: Segfault in new freelist bulk freeing


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/18ba34c5
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/18ba34c5
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/18ba34c5

Branch: refs/heads/5.2.x
Commit: 18ba34c57a60feed582f38ede3b69bb238f82f46
Parents: cc09ff3
Author: Brian Geffon <briang@apache.org>
Authored: Fri Jan 9 15:08:57 2015 -0800
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Fri Jan 9 19:18:05 2015 -0700

----------------------------------------------------------------------
 lib/ts/ink_queue.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/18ba34c5/lib/ts/ink_queue.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_queue.cc b/lib/ts/ink_queue.cc
index a841fb3..7847b2d 100644
--- a/lib/ts/ink_queue.cc
+++ b/lib/ts/ink_queue.cc
@@ -316,7 +316,8 @@ ink_freelist_free_bulk(InkFreeList *f, void *head, void *tail, size_t
num_item)
     for (size_t i = 0; i<num_item; i++) {
       for (int j = sizeof(void*); j < (int)f->type_size; j++)
         ((char*)temp)[j] = str[j % 4];
-      temp = *ADDRESS_OF_NEXT(temp, 0);
+      *ADDRESS_OF_NEXT(temp, 0) = FROM_PTR(*ADDRESS_OF_NEXT(temp,0));
+      temp = TO_PTR(*ADDRESS_OF_NEXT(temp, 0));
     }
   }
 #endif /* DEADBEEF */


Mime
View raw message