[PATCH] [ASan] Fix stack-overflow.cc test on PowerPC64 Linux
Jay Foad
jay.foad at gmail.com
Fri Jan 2 05:43:21 PST 2015
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().
http://reviews.llvm.org/D6777
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list