|
From: <sv...@va...> - 2011-01-28 00:45:01
|
Author: sewardj
Date: 2011-01-28 00:44:52 +0000 (Fri, 28 Jan 2011)
New Revision: 11515
Log:
Don't produce suppression stack pseudo-traces with more than
VG_MAX_SUPP_CALLERS entries in them. Fixes #255822.
Modified:
trunk/coregrind/m_errormgr.c
Modified: trunk/coregrind/m_errormgr.c
===================================================================
--- trunk/coregrind/m_errormgr.c 2011-01-28 00:19:25 UTC (rev 11514)
+++ trunk/coregrind/m_errormgr.c 2011-01-28 00:44:52 UTC (rev 11515)
@@ -376,10 +376,14 @@
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
|