From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#9948: valgrind warning: Conditional jump or move depends on uninitialised value(s) in redisplay_window Date: Sun, 06 Nov 2011 21:04:40 -0800 Organization: UCLA Computer Science Department Message-ID: <4EB766E8.5050908@cs.ucla.edu> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1320642322 5141 80.91.229.12 (7 Nov 2011 05:05:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 7 Nov 2011 05:05:22 +0000 (UTC) To: 9948@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 07 06:05:18 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RNHOX-0005BW-Gf for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2011 06:05:17 +0100 Original-Received: from localhost ([::1]:46849 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNHOX-0002RF-1a for geb-bug-gnu-emacs@m.gmane.org; Mon, 07 Nov 2011 00:05:17 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:43262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNHOT-0002Qt-G0 for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2011 00:05:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNHOS-00087s-Aq for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2011 00:05:13 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56890) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNHOS-00087o-1d for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2011 00:05:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RNHRB-0002Gz-GY for bug-gnu-emacs@gnu.org; Mon, 07 Nov 2011 00:08:01 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Nov 2011 05:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9948 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9948-submit@debbugs.gnu.org id=B9948.13206424538698 (code B ref 9948); Mon, 07 Nov 2011 05:08:01 +0000 Original-Received: (at 9948) by debbugs.gnu.org; 7 Nov 2011 05:07:33 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNHQj-0002GF-7K for submit@debbugs.gnu.org; Mon, 07 Nov 2011 00:07:33 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNHQe-0002G4-P3 for 9948@debbugs.gnu.org; Mon, 07 Nov 2011 00:07:30 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 9195239E800A for <9948@debbugs.gnu.org>; Sun, 6 Nov 2011 21:04:37 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3SGj+7YstBVd for <9948@debbugs.gnu.org>; Sun, 6 Nov 2011 21:04:37 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 1D90E39E8007 for <9948@debbugs.gnu.org>; Sun, 6 Nov 2011 21:04:37 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 07 Nov 2011 00:08:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53642 Archived-At: --track-origins=yes should help, but in the meantime, valgrind's bug report doesn't necessarily mean that no code ever set scrolling_up. It could be that scrolling_up was set this way: scrolling_up = PT > margin_pos; but that margin_pos wasn't properly initialized. For example, suppose margin_pos was set this way: margin_pos = IT_CHARPOS (it1); This initialization would not be correct if IT_CHARPOS (it1) referenced an uninitialized variable. Unfortunately valgrind won't report any error in IT_CHARPOS (it1) until scrolling_up is used. That's because it does not report use of uninitialized storage: it reports only when conditional branches or syscalls or addresses depend on the contents of the uninitialized storage. It's too bad that valgrind works this way. It'd be more convenient if it reported use of uninitialized storage right away. But it'd be hard for valgrind to do better, without reporting lots of false positives for structures that contain holes, so it is what it is.