From: Julian Seward Date: Mon, 14 Feb 2011 10:32:20 +0000 (+0000) Subject: Merge from trunk, r11515 (Don't produce suppression stack X-Git-Tag: svn/VALGRIND_3_6_1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f88e792f29e20a580861f3a626abc6f965eec14d;p=thirdparty%2Fvalgrind.git Merge from trunk, r11515 (Don't produce suppression stack pseudo-traces with more than VG_MAX_SUPP_CALLERS entries in them.) git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_3_6_BRANCH@11548 --- diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c index 96638e55e3..d043747667 100644 --- a/coregrind/m_errormgr.c +++ b/coregrind/m_errormgr.c @@ -376,10 +376,14 @@ static void gen_suppression(Error* err) VG_(xaprintf)(text, " %s\n", xtra); // Print stack trace elements + UInt n_ips = VG_(get_ExeContext_n_ips)(ec); + tl_assert(n_ips > 0); + if (n_ips > VG_MAX_SUPP_CALLERS) + n_ips = VG_MAX_SUPP_CALLERS; VG_(apply_StackTrace)(printSuppForIp_nonXML, text, VG_(get_ExeContext_StackTrace)(ec), - VG_(get_ExeContext_n_ips)(ec)); + n_ips); VG_(xaprintf)(text, "}\n"); // zero terminate