all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Antipov <dmantipov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Emacs development discussions <emacs-devel@gnu.org>
Subject: One more warning about using an uninitialized field
Date: Thu, 23 Jan 2014 13:08:18 +0400	[thread overview]
Message-ID: <52E0DC02.3090203@yandex.ru> (raw)

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

Dmitry



             reply	other threads:[~2014-01-23  9:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23  9:08 Dmitry Antipov [this message]
2014-01-23 16:20 ` One more warning about using an uninitialized field Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E0DC02.3090203@yandex.ru \
    --to=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.