Author: sewardj
Date: 2008-03-03 22:20:51 +0000 (Mon, 03 Mar 2008)
New Revision: 7551

Log:
VG_(get_strace_wrk): don't segfault in the degenerate case fp_min =
fp_max_orig = 0.



Modified:
   trunk/coregrind/m_stacktrace.c


Modified: trunk/coregrind/m_stacktrace.c
===================================================================
--- trunk/coregrind/m_stacktrace.c      2008-03-03 20:40:51 UTC (rev 7550)
+++ trunk/coregrind/m_stacktrace.c      2008-03-03 22:20:51 UTC (rev 7551)
@@ -90,7 +90,8 @@
    // current page, at least.  Dunno if it helps.
    // NJN 2002-sep-17: seems to -- stack traces look like 1.0.X again
    fp_max = VG_PGROUNDUP(fp_max_orig);
-   fp_max -= sizeof(Addr);
+   if (fp_max >= sizeof(Addr))
+      fp_max -= sizeof(Addr);
 
    if (debug)
       VG_(printf)("n_ips=%d fp_min=%p fp_max_orig=%p, "


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
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