components/desktop/firefox/patches/firefox-35-mozalloc.patch
author Petr Sumbera <petr.sumbera@oracle.com>
Mon, 05 Sep 2016 05:00:46 -0700
branchs11u3-sru
changeset 7035 4c2f26e9d5ab
child 7364 1ac24a377555
permissions -rw-r--r--
24361911 Upgrade Firefox to version 45.4.0 ESR 23033044 firefox needs to be built with "--with-intl-api" option 24708365 problem in FIREFOX/BROWSER 24708614 problem in FIREFOX/BROWSER

Correctly define malloc_usable_size

Get correct abort() function definition for Solaris.

diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp
--- a/memory/mozalloc/mozalloc.cpp
+++ b/memory/mozalloc/mozalloc.cpp
@@ -208,6 +208,8 @@
 #endif // if defined(HAVE_VALLOC) 
 
 #ifndef MOZ_STATIC_RUNTIME
+extern "C" size_t malloc_usable_size(const void *ptr);
+
 size_t
 moz_malloc_usable_size(void *ptr)
 {
diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp
--- a/memory/mozalloc/mozalloc_abort.cpp
+++ b/memory/mozalloc/mozalloc_abort.cpp
@@ -63,7 +63,11 @@
 //
 // That segmentation fault will be interpreted as another bug by ASan and as a
 // result, ASan will just exit(1) instead of aborting.
+#if defined(SOLARIS)
+void std::abort(void)
+#else
 void abort(void)
+#endif
 {
 #ifdef MOZ_WIDGET_ANDROID
     char msg[64] = {};