https://bugs.kde.org/show_bug.cgi?id=514297

--- Comment #29 from Mark Wielaard <[email protected]> ---
(In reply to mcermak from comment #23)
> > Could you investigate how things work with 
> > memcheck/tests/descr_belowsp.vgtest ?
> 
> Seems like the testcase is missing "In stack guard protected page" in the
> output.  This is supposed to come from coregrind/m_addrinfo.c:242:
> 
> 236          if (seg != NULL && seg->kind == SkAnonC
> 237              && !seg->hasR && !seg->hasW && !seg->hasX) {
> 238             /* This looks a plausible guard page. Check if a is close to
> 239                the start of stack (lowest byte). */
> 240             tid = find_tid_with_stack_containing (VG_PGROUNDUP(a+1));
> 241             if (tid != VG_INVALID_THREADID)
> 242                stackPos = StackPos_guard_page;
> 
> ... this apparently is a place where the new madvise guard page support
> should be taken into account as well.

Good find.
So here we would need something like:

          if (seg != NULL && seg->kind == SkAnonC
              && ((!seg->hasR && !seg->hasW && !seg->hasX)
#if defined(VGO_linux)
                      || (seg->hasGuardPages && am_is_guarded (a))
#endif
                     ) {
             /* This looks a plausible guard page. Check if a is close to
                the start of stack (lowest byte). */

? where am_is_guarded would be some new exported helper from the aspace
manager?

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to