components/desktop/thunderbird/patches/firefox-35-mozalloc.patch
changeset 7018 fdf447a07aff
parent 7017 25872950aa80
child 7020 58ca1f0fa3a7
equal deleted inserted replaced
7017:25872950aa80 7018:fdf447a07aff
     1 Correctly define malloc_usable_size
       
     2 
       
     3 Get correct abort() function definition for Solaris.
       
     4 
       
     5 diff --git a/memory/mozalloc/mozalloc.cpp b/memory/mozalloc/mozalloc.cpp
       
     6 --- a/memory/mozalloc/mozalloc.cpp
       
     7 +++ b/memory/mozalloc/mozalloc.cpp
       
     8 @@ -208,6 +208,8 @@
       
     9  #endif // if defined(HAVE_VALLOC) 
       
    10  
       
    11  #ifndef MOZ_STATIC_RUNTIME
       
    12 +extern "C" size_t malloc_usable_size(const void *ptr);
       
    13 +
       
    14  size_t
       
    15  moz_malloc_usable_size(void *ptr)
       
    16  {
       
    17 diff --git a/memory/mozalloc/mozalloc_abort.cpp b/memory/mozalloc/mozalloc_abort.cpp
       
    18 --- a/memory/mozalloc/mozalloc_abort.cpp
       
    19 +++ b/memory/mozalloc/mozalloc_abort.cpp
       
    20 @@ -63,7 +63,11 @@
       
    21  //
       
    22  // That segmentation fault will be interpreted as another bug by ASan and as a
       
    23  // result, ASan will just exit(1) instead of aborting.
       
    24 +#if defined(SOLARIS)
       
    25 +void std::abort(void)
       
    26 +#else
       
    27  void abort(void)
       
    28 +#endif
       
    29  {
       
    30  #ifdef MOZ_WIDGET_ANDROID
       
    31      char msg[64] = {};