Bug 464680

Summary: Show issues caused by memory policies like selinux deny_execmem
Product: [Developer tools] valgrind Reporter: Mark Wielaard <mark>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Propagate memory allocation failure to out_of_memory_NORETURN

Description Mark Wielaard 2023-01-23 09:00:38 UTC
Created attachment 155524 [details]
Propagate memory allocation failure to out_of_memory_NORETURN

Some memory policies, like selinux deny_execmem cause hard to understand error messages. 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.
Comment 1 Mark Wielaard 2023-04-19 17:07:12 UTC
commit f32cc294e363f9ea953b22cddcb290954725d83b
Author: Mark Wielaard <mark@klomp.org>
Date:   Sun Jan 22 23:18:18 2023 +0100

    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).