https://bugs.kde.org/show_bug.cgi?id=511717
--- Comment #33 from Philippe Waroquiers <[email protected]> --- With the below patch, glibc falls back to mprotect for the guard pages (i.e. this implements the first proposed (ugly?) solution). Can you check if this patch solves (or rather bypasses) the problem ? Thanks Pḧilippe diff --git a/coregrind/m_syswrap/syswrap-generic.c b/coregrind/m_syswrap/syswrap-generic.c index 2c113c69c..e2e59e277 100644 --- a/coregrind/m_syswrap/syswrap-generic.c +++ b/coregrind/m_syswrap/syswrap-generic.c @@ -3112,6 +3112,15 @@ PRE(sys_madvise) ARG1, ARG2, SARG3); PRE_REG_READ3(long, "madvise", unsigned long, start, vki_size_t, length, int, advice); + /* Ugly hack to try to bypass the problem of guard pages not being + understood by valgrind aspace manager. + By making the syscall fail, we expect glibc to fallback + on implementing guard pages with mprotect PROT_NONE to ensure + the valgrind address space manager is not confused wrongly + believing the guard page is rw. */ +#define VKI_MADV_GUARD_INSTALL 102 + if (ARG3 == VKI_MADV_GUARD_INSTALL) + SET_STATUS_Failure( VKI_EINVAL ); } #if HAVE_MREMAP -- You are receiving this mail because: You are watching all bug changes.
