commit c55f2b7400d2d53e6a0cd41c5c137d949d4f5839
Author: Arlo Breault <arlolra(a)gmail.com>
Date: Wed Mar 23 19:56:29 2016 -0700
Patch for trac 18331
---
projects/instantbird/config | 2 +
projects/instantbird/trac-18331.mozpatch | 151 +++++++++++++++++++++++++++++++
2 files changed, 153 insertions(+)
diff --git a/projects/instantbird/config b/projects/instantbird/config
index 8ba9f7d..2624e1e 100644
--- a/projects/instantbird/config
+++ b/projects/instantbird/config
@@ -113,6 +113,8 @@ input_files:
enable: '[% c("var/windows") %]'
- filename: bug-1167248.mozpatch
enable: '[% c("var/windows") %]'
+ - filename: trac-18331.mozpatch
+ enable: '[% c("var/osx") %]'
- filename: Bug-9173-Change-the-default-Firefox-profile-director.mozpatch
- filename: trac-16475.mozpatch
- filename: OSX-package-as-tar.bz2.mozpatch
diff --git a/projects/instantbird/trac-18331.mozpatch b/projects/instantbird/trac-18331.mozpatch
new file mode 100644
index 0000000..90f0136
--- /dev/null
+++ b/projects/instantbird/trac-18331.mozpatch
@@ -0,0 +1,151 @@
+# HG changeset patch
+# User Arlo Breault <arlolra(a)gmail.com>
+# Date 1458787927 25200
+# Wed Mar 23 19:52:07 2016 -0700
+# Branch THUNDERBIRD450b3_2016032212_RELBRANCH
+# Node ID b6d62c260cb2d71eea2a13d9b0c64ccb6bd0a42e
+# Parent ded7e4b0a11f15704ecaccd5e570cc7c59f4c7a8
+Adjust atomic ops code to be more compatible with thread sanitizer tools.
+
+diff --git a/intl/icu/source/common/putilimp.h b/intl/icu/source/common/putilimp.h
+--- a/intl/icu/source/common/putilimp.h
++++ b/intl/icu/source/common/putilimp.h
+@@ -1,12 +1,12 @@
+ /*
+ ******************************************************************************
+ *
+-* Copyright (C) 1997-2015, International Business Machines
++* Copyright (C) 1997-2014, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ *
+ ******************************************************************************
+ *
+ * FILE NAME : putilimp.h
+ *
+ * Date Name Description
+ * 10/17/04 grhoten Move internal functions from putil.h to this file.
+@@ -224,31 +224,16 @@ typedef size_t uintptr_t;
+ # if defined(U_HAVE_ATOMIC) && U_HAVE_ATOMIC
+ # define U_HAVE_STD_ATOMICS 1
+ # else
+ # define U_HAVE_STD_ATOMICS 0
+ # endif
+ #endif
+
+
+-/**
+- * \def U_HAVE_CLANG_ATOMICS
+- * Defines whether Clang c11 style built-in atomics are avaialable.
+- * These are used in preference to gcc atomics when both are available.
+- */
+-#ifdef U_HAVE_CLANG_ATOMICS
+- /* Use the predefined value. */
+-#elif __has_builtin(__c11_atomic_load) && \
+- __has_builtin(__c11_atomic_store) && \
+- __has_builtin(__c11_atomic_fetch_add) && \
+- __has_builtin(__c11_atomic_fetch_sub)
+-# define U_HAVE_CLANG_ATOMICS 1
+-#else
+-# define U_HAVE_CLANG_ATOMICS 0
+-#endif
+
+ /*===========================================================================*/
+ /** @{ Programs used by ICU code */
+ /*===========================================================================*/
+
+ /**
+ * \def U_MAKE_IS_NMAKE
+ * Defines whether the "make" program is Windows nmake.
+diff --git a/intl/icu/source/common/umutex.cpp b/intl/icu/source/common/umutex.cpp
+--- a/intl/icu/source/common/umutex.cpp
++++ b/intl/icu/source/common/umutex.cpp
+@@ -339,27 +339,27 @@ umtx_atomic_dec(u_atomic_int32_t *p) {
+ umtx_lock(&gIncDecMutex);
+ retVal = --(*p);
+ umtx_unlock(&gIncDecMutex);
+ return retVal;
+ }
+
+ U_COMMON_API int32_t U_EXPORT2
+ umtx_loadAcquire(u_atomic_int32_t &var) {
++ int32_t val = var;
+ umtx_lock(&gIncDecMutex);
+- int32_t val = var;
+ umtx_unlock(&gIncDecMutex);
+ return val;
+ }
+
+ U_COMMON_API void U_EXPORT2
+ umtx_storeRelease(u_atomic_int32_t &var, int32_t val) {
+ umtx_lock(&gIncDecMutex);
++ umtx_unlock(&gIncDecMutex);
+ var = val;
+- umtx_unlock(&gIncDecMutex);
+ }
+
+ U_NAMESPACE_END
+ #endif
+
+ //--------------------------------------------------------------------------
+ //
+ // Deprecated functions for setting user mutexes.
+diff --git a/intl/icu/source/common/umutex.h b/intl/icu/source/common/umutex.h
+--- a/intl/icu/source/common/umutex.h
++++ b/intl/icu/source/common/umutex.h
+@@ -1,11 +1,11 @@
+ /*
+ **********************************************************************
+-* Copyright (C) 1997-2015, International Business Machines
++* Copyright (C) 1997-2014, International Business Machines
+ * Corporation and others. All Rights Reserved.
+ **********************************************************************
+ *
+ * File UMUTEX.H
+ *
+ * Modification History:
+ *
+ * Date Name Description
+@@ -113,43 +113,16 @@ inline int32_t umtx_atomic_inc(u_atomic_
+ }
+
+ inline int32_t umtx_atomic_dec(u_atomic_int32_t *var) {
+ return InterlockedDecrement(var);
+ }
+ U_NAMESPACE_END
+
+
+-#elif U_HAVE_CLANG_ATOMICS
+-/*
+- * Clang __c11 atomic built-ins
+- */
+-
+-U_NAMESPACE_BEGIN
+-typedef _Atomic(int32_t) u_atomic_int32_t;
+-#define ATOMIC_INT32_T_INITIALIZER(val) val
+-
+-inline int32_t umtx_loadAcquire(u_atomic_int32_t &var) {
+- return __c11_atomic_load(&var, __ATOMIC_ACQUIRE);
+-}
+-
+-inline void umtx_storeRelease(u_atomic_int32_t &var, int32_t val) {
+- return __c11_atomic_store(&var, val, __ATOMIC_RELEASE);
+-}
+-
+-inline int32_t umtx_atomic_inc(u_atomic_int32_t *var) {
+- return __c11_atomic_fetch_add(var, 1, __ATOMIC_SEQ_CST) + 1;
+-}
+-
+-inline int32_t umtx_atomic_dec(u_atomic_int32_t *var) {
+- return __c11_atomic_fetch_sub(var, 1, __ATOMIC_SEQ_CST) - 1;
+-}
+-U_NAMESPACE_END
+-
+-
+ #elif U_HAVE_GCC_ATOMICS
+ /*
+ * gcc atomic ops. These are available on several other compilers as well.
+ */
+
+ U_NAMESPACE_BEGIN
+ typedef int32_t u_atomic_int32_t;
+ #define ATOMIC_INT32_T_INITIALIZER(val) val