]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure sp[0] and fp[0] are set in a rarely-taken path. Thanks to
authorJulian Seward <jseward@acm.org>
Fri, 2 May 2008 22:27:07 +0000 (22:27 +0000)
committerJulian Seward <jseward@acm.org>
Fri, 2 May 2008 22:27:07 +0000 (22:27 +0000)
Bart for spotting this.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7994

coregrind/m_stacktrace.c

index 2f5bb097e800c3ed7dbab9b7872f6fcb39f68ac0..ae6aa3d755a59f64141b119a4aa71f725a11f234 100644 (file)
@@ -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;
    }