Updated Branches:
  refs/heads/master 5ad8eabdf -> a3f945ccf

TS-2322: set pcre memory callbacks globally, not as a remap side-effect


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

Branch: refs/heads/master
Commit: a3f945ccf4ff872dee38dc5360788094f7fbf002
Parents: 5ad8eab
Author: James Peach <[email protected]>
Authored: Wed Oct 30 10:44:32 2013 -0700
Committer: James Peach <[email protected]>
Committed: Tue Nov 5 16:35:47 2013 -0800

----------------------------------------------------------------------
 CHANGES                        | 5 ++++-
 proxy/Main.cc                  | 3 +++
 proxy/http/remap/UrlRewrite.cc | 6 ++----
 3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a3f945cc/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index f66f18b..3db1966 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 4.1.0
 
- *) [TS-1955] Range: requests during read-while-writer gets the wrong
+
+  *) [TS-2322] Set PCRE malloc hooks globally.
+
+  *) [TS-1955] Range: requests during read-while-writer gets the wrong
   Content-Length.
 
   *) [TS-2245] This adds a '2' config state to the ignore mismatch configs.

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a3f945cc/proxy/Main.cc
----------------------------------------------------------------------
diff --git a/proxy/Main.cc b/proxy/Main.cc
index 81b6246..ed9141b 100644
--- a/proxy/Main.cc
+++ b/proxy/Main.cc
@@ -1292,6 +1292,9 @@ main(int /* argc ATS_UNUSED */, char **argv)
   mcheck_pedantic(NULL);
 #endif
 
+  pcre_malloc = ats_malloc;
+  pcre_free = ats_free;
+
   // Verify system dependent 'constants'
   check_system_constants();
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a3f945cc/proxy/http/remap/UrlRewrite.cc
----------------------------------------------------------------------
diff --git a/proxy/http/remap/UrlRewrite.cc b/proxy/http/remap/UrlRewrite.cc
index f88df84..5b15863 100644
--- a/proxy/http/remap/UrlRewrite.cc
+++ b/proxy/http/remap/UrlRewrite.cc
@@ -527,11 +527,9 @@ UrlRewrite::UrlRewrite(const char *file_var_in)
 
   if (0 == this->BuildTable()) {
     _valid = true;
-    pcre_malloc = &ats_malloc;
-    pcre_free = &ats_free;
-
-    if (is_debug_tag_set("url_rewrite"))
+    if (is_debug_tag_set("url_rewrite")) {
       Print();
+    }
   } else {
     Warning("something failed during BuildTable() -- check your remap 
plugins!");
   }

Reply via email to