You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2014/01/03 18:19:01 UTC
[30/50] git commit: TS-2463] Crash regression around slow-log feature
TS-2463] Crash regression around slow-log feature
This happens when logging a slow event, and fixes commit c290ce0df2a.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/5cc64bf4
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/5cc64bf4
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/5cc64bf4
Branch: refs/heads/5.0.x
Commit: 5cc64bf4552f331d115ce595f8f28202fb4c455e
Parents: 1018957
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Dec 31 11:01:39 2013 -0700
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Dec 31 11:01:39 2013 -0700
----------------------------------------------------------------------
CHANGES | 6 ++++--
proxy/hdrs/HTTP.cc | 9 +++++++--
proxy/http/HttpSM.cc | 4 +++-
3 files changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 168a087..96b7ba8 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,10 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 4.2.0
- *) [TS-32] Fix ICP.
- Author: Gota Adachi <ad...@iij.ad.jp>
+ *) [TS-2463] Crash regression around slow-log feature, when logging an
+ event. This fixes commit c290ce0df2a.
+
+ *) [TS-32] Fix ICP. Author: Gota Adachi <ad...@iij.ad.jp>
*) [TS-2248] Segmentation fault in HttpTunnel with flow control.
Author: bettydramit <b1...@gmail.com>.
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/proxy/hdrs/HTTP.cc
----------------------------------------------------------------------
diff --git a/proxy/hdrs/HTTP.cc b/proxy/hdrs/HTTP.cc
index 6ecaf35..b9b8dc6 100644
--- a/proxy/hdrs/HTTP.cc
+++ b/proxy/hdrs/HTTP.cc
@@ -1576,7 +1576,8 @@ class UrlPrintHack {
};
char*
-HTTPHdr::url_string_get(Arena* arena, int* length) {
+HTTPHdr::url_string_get(Arena* arena, int* length)
+{
char* zret = 0;
UrlPrintHack hack(this);
@@ -1594,7 +1595,11 @@ HTTPHdr::url_string_get(Arena* arena, int* length) {
}
int
-HTTPHdr::url_print(char* buff, int length, int* offset, int* skip) {
+HTTPHdr::url_print(char* buff, int length, int* offset, int* skip)
+{
+ ink_release_assert(offset);
+ ink_release_assert(skip);
+
int zret = 0;
UrlPrintHack hack(this);
if (hack.is_valid()) {
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/5cc64bf4/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index e224527..df9dac5 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -6596,8 +6596,10 @@ HttpSM::update_stats()
ink_hrtime_from_msec(t_state.http_config_param->slow_log_threshold) < total_time) {
URL* url = t_state.hdr_info.client_request.url_get();
char url_string[256] = "";
+ int offset = 0;
+ int skip = 0;
- t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, 0, 0);
+ t_state.hdr_info.client_request.url_print(url_string, sizeof url_string, &offset, &skip);
// unique id
char unique_id_string[128] = "";