You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ig...@apache.org on 2014/01/21 14:48:18 UTC

git commit: TS-2452: Can't access a deleted object

Updated Branches:
  refs/heads/4.1.x d738e3985 -> 39ba53d86


TS-2452: Can't access a deleted object

It's an obvious bug, blame me:(.

Signed-off-by: Yunkai Zhang <qi...@taobao.com>

Conflicts:
	CHANGES (also, fix merge artifacts in this file from previous
	cherry-picking)


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

Branch: refs/heads/4.1.x
Commit: 39ba53d86971cd41fbef6239d4d4da63441f39a1
Parents: d738e39
Author: Yunkai Zhang <qi...@taobao.com>
Authored: Wed Dec 25 22:36:49 2013 +0800
Committer: Igor Galić <i....@brainsware.org>
Committed: Tue Jan 21 14:47:47 2014 +0100

----------------------------------------------------------------------
 CHANGES                    | 3 ++-
 proxy/logging/LogObject.cc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/39ba53d8/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 0f2ca20..890db65 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,11 +1,12 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.1.3
 
-<<<<<<< HEAD
   *) [TS-2497] Failed post results in tunnel buffers being returned to
    freelist prematurely.
    Reporter: Thomas Jackson <th...@linkedin.com>
 
+  *) [TS-2452] Can't access a deleted object.
+
   *) [TS-2463] Crash regression around slow-log feature, when logging an
    event. This fixes commit c290ce0df2a.
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/39ba53d8/proxy/logging/LogObject.cc
----------------------------------------------------------------------
diff --git a/proxy/logging/LogObject.cc b/proxy/logging/LogObject.cc
index 5109469..778cf7b 100644
--- a/proxy/logging/LogObject.cc
+++ b/proxy/logging/LogObject.cc
@@ -48,12 +48,12 @@ LogBufferManager::preproc_buffers(LogBufferSink *sink) {
       // Still has outstanding references.
       write_list.push(b);
     } else if (_num_flush_buffers > FLUSH_ARRAY_SIZE) {
-      delete b;
       ink_atomic_increment(&_num_flush_buffers, -1);
       Warning("Dropping log buffer, can't keep up.");
       RecIncrRawStat(log_rsb, this_thread()->mutex->thread_holding,
                      log_stat_bytes_lost_before_preproc_stat,
                      b->header()->byte_count);
+      delete b;
     } else {
       new_q.push(b);
     }