[PATCH] [ASan] Fix stack-overflow.cc test on PowerPC64 Linux
    Jay Foad 
    jay.foad at gmail.com
       
    Tue Jan  6 01:25:24 PST 2015
    
    
  
In http://reviews.llvm.org/D6777#105104, @foad wrote:
> Here's my current theory about what's going wrong with /proc/maps:
>
> 1. Whenever the kernel allocates some stack memory, it also tries to allocate an extra guard page just before the stack. But this can fail, e.g. if you have already reached RLIMIT_STACK. See mm/memory.c:check_stack_guard_page(), which calls mm/mmap.c:expand_downwards(), which calls acct_stack_growth() to check the rlimits.
> 2. /proc/maps adjusts the start address of a stack mapping so as not to include the guard page, but it does this unconditionally, even if the attempt to allocate a guard page failed. See fs/proc/task_mmu.c:show_map_vma().
I've reported this to the kernel people here: http://lkml.iu.edu//hypermail/linux/kernel/1501.0/01025.html
http://reviews.llvm.org/D6777
EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
    
    
More information about the llvm-commits
mailing list