Update: the patch included below solves the exp-drd crash. This patch
backs out the post-3.3.0 changes in coregrind/m_stacktrace.c.

Index: coregrind/m_stacktrace.c
===================================================================
--- coregrind/m_stacktrace.c    (revision 7307)
+++ coregrind/m_stacktrace.c    (revision 7290)
@@ -97,9 +97,11 @@
    /* Assertion broken before main() is reached in pthreaded programs;  the
     * offending stack traces only have one item.  --njn, 2002-aug-16 */
    /* vg_assert(fp_min <= fp_max);*/
-   if (fp_min + 512 >= fp_max) {
-      /* If the stack limits look bogus, don't poke around ... but
-         don't bomb out either. */
+
+   if (fp_min + VG_(clo_max_stackframe) <= fp_max) {
+      /* If the stack is ridiculously big, don't poke around ... but
+         don't bomb out either.  Needed to make John Regehr's
+         user-space threads package work. JRS 20021001 */
       ips[0] = ip;
       return 1;
    }


On Dec 23, 2007 6:29 PM, Bart Van Assche <[EMAIL PROTECTED]> wrote:
> Since a few days exp-drd now crashes on every program that I try to
> analyze. This crash did not yet occur with Valgrind version 3.3.0 but
> does occur with revision 7307. The relevant call stack is shown below.
> Is this due to exp-drd or due to the post-3.3.0 changes ?
>
> $ ./debug-in-place --tool=exp-drd exp-drd/tests/fp_race
> (gdb) run --tool=exp-drd exp-drd/tests/fp_race
> Starting program:
> /home/bart/software/valgrind-svn/.in_place/amd64-linux/exp-drd
> --tool=exp-drd exp-drd/tests/fp_race
> ==17491== exp-drd, a data race detector.
> ==17491== NOTE: This is an Experimental-Class Valgrind Tool.
> ==17491== Copyright (C) 2006-2007, and GNU GPL'd, by Bart Van Assche.
> ==17491== Using LibVEX rev 1803, a library for dynamic binary translation.
> ==17491== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
> ==17491== Using valgrind-3.4.0.SVN, a dynamic binary instrumentation 
> framework.
> ==17491== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
> ==17491== For more details, rerun with: -v
> ==17491==
>
> Program received signal SIGSEGV, Segmentation fault.
> vgPlain_get_StackTrace2 (tid_if_known=<value optimized out>, ips=0x389113f0,
>     n_ips=12, ip=0, sp=0, fp=0, lr=0, fp_min=0, fp_max_orig=0)
>     at m_stacktrace.c:230
> 230              ip = (((UWord*)fp)[1]);
> (gdb) where
> #0  vgPlain_get_StackTrace2 (tid_if_known=<value optimized out>,
>     ips=0x389113f0, n_ips=12, ip=0, sp=0, fp=0, lr=0, fp_min=0, fp_max_orig=0)
>     at m_stacktrace.c:230
> #1  0x000000003801aada in vgPlain_get_StackTrace (tid=1, ips=0x389113f0,
>     n_ips=12, first_ip_delta=<value optimized out>) at m_stacktrace.c:437
> #2  0x00000000380099d6 in record_ExeContext_wrk (tid=1, first_ip_delta=0,
>     first_ip_only=0 '\0') at m_execontext.c:309
> #3  0x0000000038004ef9 in sg_init (sg=0x402001380, creator=0, created=1)
>     at drd_segment.c:68
> #4  0x0000000038004fd7 in sg_new (creator=0, created=1) at drd_segment.c:110
> #5  0x0000000038006ce7 in thread_pre_create (creator=0, vg_created=1)
>     at drd_thread.c:222
> #6  0x0000000038002a0c in drd_pre_thread_create (creator=0, created=1)
>     at drd_main.c:323
> #7  0x00000000380106cd in valgrind_main (argc=<value optimized out>,
>     argv=<value optimized out>, envp=0x7fffa1083d68) at m_main.c:1756
> #8  0x00000000380122de in _start_in_C_linux (pArgc=0x7fffa1083d40)
>     at m_main.c:2369
> #9  0x000000003800f1a1 in _start ()
>
>
> --
> Regards,
>
> Bart Van Assche.
>



-- 
Met vriendelijke groeten,

Bart Van Assche.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Valgrind-developers mailing list
Valgrind-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-developers

Reply via email to