Propagate memory allocation failure to out_of_memory_NORETURN
commitf32cc294e363f9ea953b22cddcb290954725d83b
authorMark Wielaard <mark@klomp.org>
Sun, 22 Jan 2023 22:18:18 +0000 (22 23:18 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 30 Mar 2023 23:31:25 +0000 (31 01:31 +0200)
tree78c869373b3a2de28fc37f158808b00a46268d58
parent2d97182f0dec988fd43cba3b6ac79641284b23af
Propagate memory allocation failure to out_of_memory_NORETURN

Provide the user with a hint of what caused an out of memory error.
And explain that some memory policies, like selinux deny_execmem
might cause Permission denied errors.

Add an err argument to out_of_memory_NORETURN. And change
am_shadow_alloc to return a SysRes (all three callers were already
checking for errors and calling out_of_memory_NORETURN).
NEWS
coregrind/m_aspacemgr/aspacemgr-linux.c
coregrind/m_mallocfree.c
coregrind/m_transtab.c
helgrind/libhb_core.c
include/pub_tool_aspacemgr.h
include/pub_tool_mallocfree.h
memcheck/mc_main.c