From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: One more warning about using an uninitialized field Date: Thu, 23 Jan 2014 18:20:45 +0200 Message-ID: <83txcuekki.fsf@gnu.org> References: <52E0DC02.3090203@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1390494048 19671 80.91.229.3 (23 Jan 2014 16:20:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 23 Jan 2014 16:20:48 +0000 (UTC) Cc: emacs-devel@gnu.org To: Dmitry Antipov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 23 17:20:54 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W6N1O-0003vY-6N for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 17:20:50 +0100 Original-Received: from localhost ([::1]:42040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6N1N-0001NE-Ng for ged-emacs-devel@m.gmane.org; Thu, 23 Jan 2014 11:20:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52575) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6N1F-0001M8-Rg for emacs-devel@gnu.org; Thu, 23 Jan 2014 11:20:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6N14-0000F0-Lm for emacs-devel@gnu.org; Thu, 23 Jan 2014 11:20:41 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:54106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6N14-0000Ew-1m for emacs-devel@gnu.org; Thu, 23 Jan 2014 11:20:30 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MZV000003YJT500@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Thu, 23 Jan 2014 18:20:29 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MZV000TR424T700@a-mtaout22.012.net.il>; Thu, 23 Jan 2014 18:20:29 +0200 (IST) In-reply-to: <52E0DC02.3090203@yandex.ru> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:168961 Archived-At: > Date: Thu, 23 Jan 2014 13:08:18 +0400 > From: Dmitry Antipov > CC: Emacs development discussions > > One more warning about using an uninitialized field, now BIDI-related: > > ==11279== Conditional jump or move depends on uninitialised value(s) > ==11279== at 0x443145: compute_display_string_pos (xdisp.c:3582) > ==11279== by 0x500D93: bidi_fetch_char (bidi.c:953) > ==11279== by 0x501FF9: bidi_paragraph_init (bidi.c:1299) > ==11279== by 0x47AEAE: Fcurrent_bidi_paragraph_direction (xdisp.c:20419) > > From xdisp.c: > > 3579 if (charpos >= eob > 3580 /* We don't support display properties whose values are strings > 3581 that have display string properties. */ > ! 3582 || string->from_disp_str > 3583 /* C strings cannot have display properties. */ > 3584 || (string->s && !STRINGP (object))) > 3585 { > 3586 *disp_prop = 0; > 3587 return eob; > 3588 } > > I don't know how critical it may be, but please consider the following precaution: > > === modified file 'src/xdisp.c' > --- src/xdisp.c 2014-01-13 11:30:30 +0000 > +++ src/xdisp.c 2014-01-23 08:53:41 +0000 > @@ -6409,6 +6409,7 @@ > it->bidi_it.string.s = NULL; > it->bidi_it.string.lstring = Qnil; > it->bidi_it.string.bufpos = 0; > + it->bidi_it.string.from_disp_str = 0; > it->bidi_it.string.unibyte = 0; > it->bidi_it.w = it->w; > } > @@ -20411,6 +20412,7 @@ > itb.string.s = NULL; > itb.string.lstring = Qnil; > itb.string.bufpos = 0; > + itb.string.from_disp_str = 0; > itb.string.unibyte = 0; > /* We have no window to use here for ignoring window-specific > overlays. Using NULL for window pointer will cause Thanks, please install these.