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

--- Comment #28 from Mark Wielaard <[email protected]> ---
(In reply to mcermak from comment #23)
> > I think the safe_to_deref before the PRE_MEM_RASCIIZ might be a 
> > separate/generic issue
> 
> Right.  I've kept it a part of the patch for now to simplify testing. 
> Moreover my patch has one more unrelated bit (initialization of vki_sigset_t
> saved in m_syswrap/syswrap-main.c) silencing my compiler complaints:
> https://sourceware.org/git/?p=valgrind.git;a=blob;f=coregrind/m_syswrap/
> syswrap-main.c;h=7a1bbb40fa22ac33f4d12ac577ab75fd7979f4dc;hb=refs/heads/
> users/mcermak/try-bug514297#l354

What compiler complaint exactly?
If at all possible we should just commit such fixups separately.

> > Could you show how these programs use the guard pages ?
> 
> Here is how a guard page is created for each new thread:
> 
> f44 x86_64 # valgrind -d python3 -c 'import time, threading;
> [threading.Thread(None, lambda: time.sleep(1)).start() for x in range(4)]'
> 2> >(grep guard)
> --98531:1: aspacem installing guard pages (addr=0x5a8a000, len=0x1000)
> --98531:1: aspacem installing guard pages (addr=0x628f000, len=0x1000)
> --98531:1: aspacem installing guard pages (addr=0x6a94000, len=0x1000)
> --98531:1: aspacem installing guard pages (addr=0x7299000, len=0x1000)
> f44 x86_64 # 
> 
> > 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.
> 
> May I get this new update reviewed / commented pretty please?

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

Reply via email to