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

            Bug ID: 365273
           Summary: Invalid write to stack location reported after signal
                    handler runs
           Product: valgrind
           Version: 3.11 SVN
          Platform: Compiled Sources
               URL: http://thread.gmane.org/gmane.comp.debugging.valgrind.
                    devel/32601
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: memcheck
          Assignee: jsew...@acm.org
          Reporter: earl_c...@yahoo.com

A complete description of the observed failed is available on the link to the
email thread.

In summary, I believe that the problem is set up as follows:

o Main thread consumes nearly all of its registered stack region
o Signal is handled in the main thread (Linux will prefer to deliver to the
main thread)
o The signal frame causes the stack region to grow, but m_signal.c incorrectly
records the base of the grown region
o Another thread runs while the signal handler runs in the main thread, causing
memcheck to become a little confused
o The signal handler returns
o An invalid write is observed in the main thread

Reproducible: Always

Steps to Reproduce:
The following test program provides an example of the "Invalid write" message,
though in a different context to that observed in the email thread.

Actual Results:  
==12529== Invalid write of size 4
==12529==    at 0x400E09C: _dl_fixup (dl-runtime.c:69)
==12529==    by 0x40144BF: _dl_runtime_resolve (dl-trampoline.S:36)
==12529==    by 0x8048768: main (in /home/earl/Development/valgrind/test)
==12529==  Address 0xbeeccfb0 is on thread 1's stack
==12529==  in frame #0, created by _dl_fixup (dl-runtime.c:66)


Expected Results:  
The proposed patch silences the warnings from memcheck.

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

Reply via email to