gecko-dev/memory/mozalloc
Andrew McCreight faa1eb2316 Bug 1295688 - InfallibleAllocPolicy should crash on overflow. r=glandium
Code that uses InfallibleAllocPolicy presumably wants for operations
to always succeed. However, Vector and HashTable can end up detecting
that growing the data structure will fail due to integer overflow, and
then will call reportAllocOverflow() and fail. I think these cases
should crash.

In addition, pod_malloc and pod_realloc should crash rather than
returning NULL when they detect overflow.

This calls mozalloc_abort rather than MOZ_CRASH directly to avoid
circular #includes, because Assertions.h includes nsTraceRefcnt.h
which includes nscore.h which includes mozalloc.h.

MozReview-Commit-ID: 1g99BXLceQI

--HG--
extra : rebase_source : 927d842588c1f85a50a7a1c50a5546d5f688555f
2016-08-16 10:56:14 -07:00
..
staticruntime Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
moz.build Bug 1286877 - do not set c-basic-offset for python-mode; r=gps 2016-07-14 10:16:42 -06:00
mozalloc_abort.cpp Bug 1203476 - Fix an Android-only warning in mozalloc_abort.cpp. r=glandium. 2015-09-10 16:20:19 -07:00
mozalloc_abort.h
mozalloc_oom.cpp
mozalloc_oom.h
mozalloc.cpp Bug 1271165 - Part 6: Change the new functions to MFBT_API to export them on OSX. r=jandem 2016-08-16 07:12:00 -04:00
mozalloc.h Bug 1295688 - InfallibleAllocPolicy should crash on overflow. r=glandium 2016-08-16 10:56:14 -07:00
msvc_raise_wrappers.cpp Bug 1248416 - add symbols for bad_function_call exception for C++ runtimes. r=nfroyd 2016-02-24 20:00:10 -05:00
msvc_raise_wrappers.h Bug 1248416 - add symbols for bad_function_call exception for C++ runtimes. r=nfroyd 2016-02-24 20:00:10 -05:00
throw_gcc.h Bug 1259537 - Unbreak libc++ build after bug 1245076. r=glandium 2016-05-01 09:32:10 +00:00
throw_msvc.h Bug 1120793 - Remove obsolete _Throw wrapping. r=froydnj 2015-08-21 14:28:41 +09:00
winheap.cpp Bug 1271165 - Part 6: Change the new functions to MFBT_API to export them on OSX. r=jandem 2016-08-16 07:12:00 -04:00