Skip to content

Commit

Permalink
Bug 1147248 - GCC 4.9 needs this patch to use address sanitizer. r=gl…
Browse files Browse the repository at this point in the history
…andium

--HG--
extra : rebase_source : 08c553d5b5ff76abd81b070ccd6e2f058a2c4e4b
  • Loading branch information
zephyrus00jp authored and gk-tpo committed Dec 17, 2015
1 parent 9e26a3a commit 07427cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion memory/mozalloc/mozalloc.h
Expand Up @@ -203,7 +203,13 @@ MOZALLOC_EXPORT void* moz_valloc(size_t size)

#define MOZALLOC_THROW_BAD_ALLOC MOZALLOC_THROW_BAD_ALLOC_IF_HAS_EXCEPTIONS

MOZALLOC_EXPORT_NEW MOZALLOC_INLINE
MOZALLOC_EXPORT_NEW
#if defined(__GNUC__) && !defined(__clang__) && defined(__SANITIZE_ADDRESS__)
/* gcc's asan somehow doesn't like always_inline on this function. */
__attribute__((gnu_inline)) inline
#else
MOZALLOC_INLINE
#endif
void* operator new(size_t size) MOZALLOC_THROW_BAD_ALLOC
{
return moz_xmalloc(size);
Expand Down

0 comments on commit 07427cb

Please sign in to comment.