From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stuart D. Herring" Newsgroups: gmane.emacs.devel Subject: Re: Problem report #60 Date: Tue, 11 Apr 2006 10:54:45 -0700 (PDT) Message-ID: <39868.128.165.123.132.1144778085.squirrel@webmail.lanl.gov> References: <200604111548.k3BFmXjS015097@scanner2.ics.uci.edu> Reply-To: herring@lanl.gov NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1144778112 1591 80.91.229.2 (11 Apr 2006 17:55:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Apr 2006 17:55:12 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 11 19:55:09 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FTN52-0003ny-Dr for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 19:55:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTN51-0008Ci-WF for ged-emacs-devel@m.gmane.org; Tue, 11 Apr 2006 13:55:08 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FTN4l-0008Bd-QO for emacs-devel@gnu.org; Tue, 11 Apr 2006 13:54:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FTN4k-0008An-EG for emacs-devel@gnu.org; Tue, 11 Apr 2006 13:54:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FTN4j-0008Ac-Pe for emacs-devel@gnu.org; Tue, 11 Apr 2006 13:54:49 -0400 Original-Received: from [192.65.95.54] (helo=mailwasher-b.lanl.gov) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FTN9d-0002Nv-Q8 for emacs-devel@gnu.org; Tue, 11 Apr 2006 13:59:54 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by mailwasher-b.lanl.gov (8.12.11/8.12.11/(ccn-5)) with ESMTP id k3BHskC9030992 for ; Tue, 11 Apr 2006 11:54:46 -0600 Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (8.12.11/8.12.11/(ccn-5)) with ESMTP id k3BHsjQw007631 for ; Tue, 11 Apr 2006 11:54:45 -0600 Original-Received: from webmail1.lanl.gov (localhost.localdomain [127.0.0.1]) by webmail1.lanl.gov (8.12.11.20060308/8.12.11) with ESMTP id k3BHsjgI015918 for ; Tue, 11 Apr 2006 11:54:45 -0600 Original-Received: (from apache@localhost) by webmail1.lanl.gov (8.12.11.20060308/8.12.11/Submit) id k3BHsj3X015916; Tue, 11 Apr 2006 10:54:45 -0700 X-Authentication-Warning: webmail1.lanl.gov: apache set sender to herring@lanl.gov using -f Original-Received: from 128.165.123.132 (SquirrelMail authenticated user 196434); by webmail.lanl.gov with HTTP; Tue, 11 Apr 2006 10:54:45 -0700 (PDT) In-Reply-To: <200604111548.k3BFmXjS015097@scanner2.ics.uci.edu> Original-To: emacs-devel@gnu.org User-Agent: SquirrelMail/1.4.3a-11.EL3 X-Mailer: SquirrelMail/1.4.3a-11.EL3 X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:52705 Archived-At: > 8608 volatile Lisp_Object original_uppercase; > 8609 volatile int original_uppercase_position = -1; > [...] original_uppercase_position remains -1 if original_uppercase is uninitialized. > At conditional (20): "dont_downcase_last != 0" taking true path > At conditional (21): "(t - 1) == original_uppercase_position" taking true > path > > 9481 if ((dont_downcase_last || first_binding >= nmaps) > 9482 && t - 1 == original_uppercase_position) Assuming that t!=0, t-1==original_uppercase_position implies that the o_u variables were set. > Event uninit_use: Using uninitialized value "original_uppercase" > Also see events: [var_decl] > > 9483 keybuf[t - 1] = original_uppercase; > 9484 So this is fine. It'd be a big bug if t were 0, though, indexing at -1 like that. Looking back up, it seems that if the while loop iterates even once, t is > 0, but what if the while test fails the first time? It looks like t would be 0, and original_uppercase_position would still be -1, and uninitialized data would be stored outside of an array. Nasty, if it can happen. Otherwise, no bug. Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.