From: Julian Seward Date: Fri, 2 May 2008 22:27:07 +0000 (+0000) Subject: Make sure sp[0] and fp[0] are set in a rarely-taken path. Thanks to X-Git-Tag: svn/VALGRIND_3_4_0~643 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9f7ad0a4524a9b5c5681e9e1748343556a8c04a;p=thirdparty%2Fvalgrind.git Make sure sp[0] and fp[0] are set in a rarely-taken path. Thanks to Bart for spotting this. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7994 --- diff --git a/coregrind/m_stacktrace.c b/coregrind/m_stacktrace.c index 2f5bb097e8..ae6aa3d755 100644 --- a/coregrind/m_stacktrace.c +++ b/coregrind/m_stacktrace.c @@ -104,6 +104,8 @@ UInt VG_(get_StackTrace_wrk) ( ThreadId tid_if_known, if (fp_min + 512 >= fp_max) { /* If the stack limits look bogus, don't poke around ... but don't bomb out either. */ + if (sps) sps[0] = sp; + if (fps) fps[0] = fp; ips[0] = ip; return 1; }