components/desktop/thunderbird/patches/firefox-35-mozalloc.patch
author Stacy Yeh <stacy.yeh@oracle.com>
Tue, 19 Jul 2016 14:15:23 -0700
changeset 6431 e4667e7df088
permissions -rw-r--r--
23601539 Update Thunderbird to version 45.1.0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6431
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     1
Correctly define malloc_usable_size
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     2
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     3
Get correct abort() function definition for Solaris.
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     4
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     5
diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     6
--- a/memory/mozalloc/mozalloc.cpp
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     7
+++ b/memory/mozalloc/mozalloc.cpp
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     8
@@ -208,6 +208,8 @@
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
     9
 #endif // if defined(HAVE_VALLOC) 
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    10
 
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    11
 #ifndef MOZ_STATIC_RUNTIME
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    12
+extern "C" size_t malloc_usable_size(const void *ptr);
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    13
+
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    14
 size_t
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    15
 moz_malloc_usable_size(void *ptr)
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    16
 {
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    17
diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    18
--- a/memory/mozalloc/mozalloc_abort.cpp
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    19
+++ b/memory/mozalloc/mozalloc_abort.cpp
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    20
@@ -63,7 +63,11 @@
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    21
 //
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    22
 // That segmentation fault will be interpreted as another bug by ASan and as a
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    23
 // result, ASan will just exit(1) instead of aborting.
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    24
+#if defined(SOLARIS)
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    25
+void std::abort(void)
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    26
+#else
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    27
 void abort(void)
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    28
+#endif
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    29
 {
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    30
 #ifdef MOZ_WIDGET_ANDROID
e4667e7df088 23601539 Update Thunderbird to version 45.1.0
Stacy Yeh <stacy.yeh@oracle.com>
parents:
diff changeset
    31
     char msg[64] = {};