gecko-dev/memory
Nathan Froyd b47e23e17a Bug 1411613 - mark certain allocation functions as non-throwing; r=glandium
glibc marks various allocation functions as `throw()`.  This addition
hasn't been a problem until we tried to enable C++17, where clang
started complaining that we were redeclaring functions with mismatched
exception specifications.  Peculiarly, glibc declares virtually
everything we redeclare as `throw()`, but clang only complains about the
mismatches for a particular subset of functions.

The approach taken in this patch is to add another potentially defined
macro to malloc_decls.h, `NOTHROW_MALLOC_DECL`.  This macro works
exactly like `MALLOC_DECL`, except that clients can define
`NOTHROW_MALLOC_DECL` to add appropriate `throw()` specifiers when
declaring functions at global scope, and thereby avoid mismatched
exception specifications.

Differential Revision: https://phabricator.services.mozilla.com/D44045

--HG--
extra : moz-landing-system : lando
2019-09-04 23:40:15 +00:00
..
build Bug 1411613 - mark certain allocation functions as non-throwing; r=glandium 2019-09-04 23:40:15 +00:00
gtest Bug 1523276 - Implement PHC, a probabilistic heap checker. r=glandium,gsvelto 2019-07-03 09:26:11 +10:00
mozalloc Bug 1411613 - mark certain allocation functions as non-throwing; r=glandium 2019-09-04 23:40:15 +00:00
replace Bug 1574388 - Implement PHC on Mac. r=gsvelto,glandium 2019-08-25 23:16:05 +00:00
volatile Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
app.mozbuild
moz.build Bug 1562358 - Move fallible.h into MFBT. r=glandium 2019-07-10 01:51:15 +00:00
moz.configure