From: Nicholas Nethercote Date: Sun, 13 Aug 2006 04:48:25 +0000 (+0000) Subject: Don't print more lines of a stack-trace than were obtained. Thanks to Bart X-Git-Tag: svn/VALGRIND_3_3_0~710 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b99e05d71cc1e7d74ef25937359a4743fc28286;p=thirdparty%2Fvalgrind.git Don't print more lines of a stack-trace than were obtained. Thanks to Bart Van Assche for spotting. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5999 --- diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 0eb2d0e4f6..c502a3f5a3 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -412,8 +412,8 @@ void VG_(pp_StackTrace) ( StackTrace ips, UInt n_ips ) void VG_(get_and_pp_StackTrace) ( ThreadId tid, UInt n_ips ) { Addr ips[n_ips]; - VG_(get_StackTrace)(tid, ips, n_ips); - VG_(pp_StackTrace) ( ips, n_ips); + UInt n_ips_obtained = VG_(get_StackTrace)(tid, ips, n_ips); + VG_(pp_StackTrace)(ips, n_ips_obtained); }