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 2015/05/02 03:28:21 UTC

[1/2] trafficserver git commit: TS-3392 Fix static initialization order, for OSX

Repository: trafficserver
Updated Branches:
  refs/heads/master b00cb7bf1 -> 566194cc9


TS-3392 Fix static initialization order, for OSX


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

Branch: refs/heads/master
Commit: 303010e92627fe9561de780c1efbd8f01e3bdf44
Parents: b00cb7b
Author: Bin Zeng <bz...@linkedin.com>
Authored: Fri May 1 19:24:36 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri May 1 19:24:36 2015 -0600

----------------------------------------------------------------------
 lib/ts/Arena.cc     | 3 +++
 lib/ts/ink_mutex.cc | 2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/303010e9/lib/ts/Arena.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Arena.cc b/lib/ts/Arena.cc
index 6ab9bdb..a67f2fe 100644
--- a/lib/ts/Arena.cc
+++ b/lib/ts/Arena.cc
@@ -21,6 +21,7 @@
   limitations under the License.
  */
 
+#include "ink_mutex.h"
 #include "libts.h"
 #include <assert.h>
 #include <string.h>
@@ -29,6 +30,8 @@
 #define DEFAULT_ALLOC_SIZE 1024
 #define DEFAULT_BLOCK_SIZE (DEFAULT_ALLOC_SIZE - (sizeof(ArenaBlock) - 8))
 
+// Define the _g_mattr first to avoid static initialization order fiasco.
+x_pthread_mutexattr_t _g_mattr;
 
 static Allocator defaultSizeArenaBlock("ArenaBlock", DEFAULT_ALLOC_SIZE);
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/303010e9/lib/ts/ink_mutex.cc
----------------------------------------------------------------------
diff --git a/lib/ts/ink_mutex.cc b/lib/ts/ink_mutex.cc
index 9036f55..98cc70a 100644
--- a/lib/ts/ink_mutex.cc
+++ b/lib/ts/ink_mutex.cc
@@ -27,6 +27,4 @@
 #include "stdio.h"
 #include "ink_mutex.h"
 
-x_pthread_mutexattr_t _g_mattr;
-
 ink_mutex __global_death = PTHREAD_MUTEX_INITIALIZER;


[2/2] trafficserver git commit: Added TS-3392 to CHANGES.

Posted by zw...@apache.org.
Added TS-3392 to CHANGES.


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

Branch: refs/heads/master
Commit: 566194cc9a418c5f3d0a29e74e251e117e9d10a4
Parents: 303010e
Author: Leif Hedstrom <zw...@apache.org>
Authored: Fri May 1 19:25:21 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Fri May 1 19:25:21 2015 -0600

----------------------------------------------------------------------
 CHANGES | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/566194cc/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index ecf0af0..1cc0ac1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 6.0.0
 
+  *) [TS-3392] Fix static initialization order, for OSX.
+   Author: Bin Zeng <bz...@linkedin.com>
+
   *) [TS-3537] Make 32-bit platforms build error, overridable with
    --enable-32bit-build.