From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.bugs Subject: [PATCH] Fix bug: Init auto var to unrandomize `stack_depth' rv. Date: Sat, 09 Jan 2010 11:01:42 +0100 Message-ID: <877hrroaux.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1263031477 26471 80.91.229.12 (9 Jan 2010 10:04:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 Jan 2010 10:04:37 +0000 (UTC) To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sat Jan 09 11:04:30 2010 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NTYBI-0001ze-Gi for guile-bugs@m.gmane.org; Sat, 09 Jan 2010 11:04:30 +0100 Original-Received: from localhost ([127.0.0.1]:39841 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTYBF-0001BW-BH for guile-bugs@m.gmane.org; Sat, 09 Jan 2010 05:04:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTYB5-00019Y-Un for bug-guile@gnu.org; Sat, 09 Jan 2010 05:04:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTYB3-00016z-Fq for bug-guile@gnu.org; Sat, 09 Jan 2010 05:04:14 -0500 Original-Received: from [199.232.76.173] (port=51131 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTYB3-00016k-5u for bug-guile@gnu.org; Sat, 09 Jan 2010 05:04:13 -0500 Original-Received: from smtp-out113.alice.it ([85.37.17.113]:1067) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTYB1-0008Ns-SF for bug-guile@gnu.org; Sat, 09 Jan 2010 05:04:12 -0500 Original-Received: from FBCMMO03.fbc.local ([192.168.68.197]) by smtp-out113.alice.it with Microsoft SMTPSVC(6.0.3790.3959); Sat, 9 Jan 2010 11:04:08 +0100 Original-Received: from FBCMCL01B04.fbc.local ([192.168.69.85]) by FBCMMO03.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sat, 9 Jan 2010 11:04:08 +0100 Original-Received: from ambire.localdomain ([79.45.74.123]) by FBCMCL01B04.fbc.local with Microsoft SMTPSVC(6.0.3790.3959); Sat, 9 Jan 2010 11:04:07 +0100 Original-Received: from ttn by ambire.localdomain with local (Exim 4.63) (envelope-from ) id 1NTY8c-0005SI-9Z for bug-guile@gnu.org; Sat, 09 Jan 2010 11:01:42 +0100 X-OriginalArrivalTime: 09 Jan 2010 10:04:07.0504 (UTC) FILETIME=[14EE2D00:01CA9113] X-detected-operating-system: by monty-python.gnu.org: Windows 2000 SP4, XP SP1+ X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:4427 Archived-At: Below is a revised patch, with updated ChangeLog entry (includes "libguile/" prefix). thi ____________________________________________________________________________ >From 666e9de72a7dbaff3ee67a77b3efc981b33c44eb Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Sat, 9 Jan 2010 09:12:49 +0100 Subject: [PATCH] Fix bug: Init auto var to unrandomize `stack_depth' rv. * libguile/stacks.c (stack_depth): Init `n'. Signed-off-by: Thien-Thi Nguyen --- libguile/stacks.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libguile/stacks.c b/libguile/stacks.c index 61b7be3..ce16063 100644 --- a/libguile/stacks.c +++ b/libguile/stacks.c @@ -66,7 +66,7 @@ static SCM stack_id_with_fp (SCM frame, SCM **fp); static long stack_depth (SCM frame, SCM *fp) { - long n; + long n = 0; /* count frames, skipping boot frames */ for (; scm_is_true (frame) && SCM_VM_FRAME_FP (frame) > fp; frame = scm_frame_previous (frame)) -- 1.6.3.2