From unknown Fri Jun 20 03:38:14 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#9983 <9983@debbugs.gnu.org> To: bug#9983 <9983@debbugs.gnu.org> Subject: Status: valgrind warning in draw_glyphs Reply-To: bug#9983 <9983@debbugs.gnu.org> Date: Fri, 20 Jun 2025 10:38:14 +0000 retitle 9983 valgrind warning in draw_glyphs reassign 9983 emacs submitter 9983 Dan Nicolaescu severity 9983 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 06 23:39:38 2011 Received: (at submit) by debbugs.gnu.org; 7 Nov 2011 04:39:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNGzh-0001dC-Cw for submit@debbugs.gnu.org; Sun, 06 Nov 2011 23:39:37 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNGzf-0001d6-8f for submit@debbugs.gnu.org; Sun, 06 Nov 2011 23:39:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNGwu-0004UJ-KE for submit@debbugs.gnu.org; Sun, 06 Nov 2011 23:36:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:43570) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNGwu-0004UE-F9 for submit@debbugs.gnu.org; Sun, 06 Nov 2011 23:36:44 -0500 Received: from eggs.gnu.org ([140.186.70.92]:55608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNGwt-0006qO-Kj for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 23:36:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RNGws-0004Tz-Qc for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 23:36:43 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:50949) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RNGws-0004Tv-Kv for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 23:36:42 -0500 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNGws-0000Kp-EF for bug-gnu-emacs@gnu.org; Sun, 06 Nov 2011 23:36:42 -0500 From: Dan Nicolaescu To: bug-gnu-emacs@gnu.org Subject: valgrind warning in draw_glyphs Date: Sun, 06 Nov 2011 23:36:42 -0500 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) trunk with lucid toolkit valgrind ./temacs -Q gives this warning (not sure exactly when, just playing with the menus and tooltips, the only "editing" action was to run a grep) ==2341== Conditional jump or move depends on uninitialised value(s) ==2341== at 0x44CDDA: draw_glyphs (xdisp.c:22981) ==2341== by 0x44D9FC: expose_area (xdisp.c:27401) ==2341== by 0x44DDA8: expose_line (xdisp.c:27426) ==2341== by 0x45B6AA: expose_window (xdisp.c:27653) ==2341== by 0x45C0DA: expose_window_tree (xdisp.c:27725) ==2341== by 0x45C0B0: expose_window_tree (xdisp.c:27723) ==2341== by 0x45C16E: expose_frame (xdisp.c:27780) ==2341== by 0x4C188D: handle_one_xevent (xterm.c:6219) ==2341== by 0x4C2F56: XTread_socket (xterm.c:7148) ==2341== by 0x4F2F26: read_avail_input (keyboard.c:6821) ==2341== by 0x4F3049: handle_async_input (keyboard.c:7149) ==2341== by 0x4F26A4: process_pending_signals (keyboard.c:7165) ==2341== Uninitialised value was created by a stack allocation ==2341== at 0x44AAD3: draw_glyphs (xdisp.c:22835) ==2341== The warning is for this: if (check_mouse_face && mouse_beg_col < start && mouse_end_col > i) it looks like mouse_beg_col and mouse_end_col could be left uninitialized a few lines above. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 00:51:58 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 05:51:58 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNI7i-0003Fr-A6 for submit@debbugs.gnu.org; Mon, 07 Nov 2011 00:51:58 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNI7h-0003Fl-2A for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 00:51:57 -0500 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNI4x-0006gC-6B; Mon, 07 Nov 2011 00:49:07 -0500 Date: Mon, 07 Nov 2011 00:49:07 -0500 Message-Id: From: Eli Zaretskii To: Dan Nicolaescu In-reply-to: (message from Dan Nicolaescu on Sun, 06 Nov 2011 23:36:42 -0500) Subject: Re: bug#9983: valgrind warning in draw_glyphs References: X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9983 Cc: 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Dan Nicolaescu > Date: Sun, 06 Nov 2011 23:36:42 -0500 > > The warning is for this: > if (check_mouse_face > && mouse_beg_col < start && mouse_end_col > i) > > it looks like mouse_beg_col and mouse_end_col could be left uninitialized a few lines above. I don't see how. These variables are initialized in this block: if (row >= mouse_beg_row && row <= mouse_end_row) { check_mouse_face = 1; mouse_beg_col = (row == mouse_beg_row) ? hlinfo->mouse_face_beg_col : 0; mouse_end_col = (row == mouse_end_row) ? hlinfo->mouse_face_end_col : row->used[TEXT_AREA]; } check_mouse_face starts as zero, and is only set to 1 in this block. So any test that is conditioned on check_mouse_face being non-zero is okay with looking at mouse_beg_col and mouse_end_col. The other variables in the line being flagged, `start' and `i', are also okay: `start' is one of the call arguments and `i' is computed right before the line being flagged. Did I miss something? From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 06:55:00 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 11:55:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNNn1-00030q-Bx for submit@debbugs.gnu.org; Mon, 07 Nov 2011 06:55:00 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNNmx-00030h-Ir for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 06:54:57 -0500 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNNkB-0006mg-Ct; Mon, 07 Nov 2011 06:52:03 -0500 From: Dan Nicolaescu To: Eli Zaretskii Subject: Re: bug#9983: valgrind warning in draw_glyphs References: Date: Mon, 07 Nov 2011 06:52:03 -0500 In-Reply-To: (Eli Zaretskii's message of "Mon, 07 Nov 2011 00:49:07 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9983 Cc: 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Eli Zaretskii writes: >> From: Dan Nicolaescu >> Date: Sun, 06 Nov 2011 23:36:42 -0500 >> >> The warning is for this: >> if (check_mouse_face >> && mouse_beg_col < start && mouse_end_col > i) >> >> it looks like mouse_beg_col and mouse_end_col could be left uninitialized a few lines above. > > I don't see how. These variables are initialized in this block: > > if (row >= mouse_beg_row && row <= mouse_end_row) > { > check_mouse_face = 1; > mouse_beg_col = (row == mouse_beg_row) > ? hlinfo->mouse_face_beg_col : 0; > mouse_end_col = (row == mouse_end_row) > ? hlinfo->mouse_face_end_col > : row->used[TEXT_AREA]; > } > > check_mouse_face starts as zero, and is only set to 1 in this block. > So any test that is conditioned on check_mouse_face being non-zero is > okay with looking at mouse_beg_col and mouse_end_col. > > The other variables in the line being flagged, `start' and `i', are > also okay: `start' is one of the call arguments and `i' is computed > right before the line being flagged. > > Did I miss something? Hmm, you might be right. Telling valgrind to attach gdb at that point: (gdb) info local overlap_hl = hlinfo = mouse_beg_col = 0x0 check_mouse_face = 0x0 dummy_x = 0x0 h = t = mouse_end_col = 0x50b3a22 head = 0x7feffe3a0 tail = 0x7feffe3a0 s = clip_head = 0x0 clip_tail = 0x0 i = j = x_reached = 0x184 last_x = 0x2ec area_left = 0x1c f = 0x5157bf0 Maybe a compiler problem, evaluating the && in the wrong order? From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 07:24:39 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 12:24:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNOFj-0003g6-0H for submit@debbugs.gnu.org; Mon, 07 Nov 2011 07:24:39 -0500 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNOFg-0003fw-8q for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 07:24:37 -0500 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 0DF811C02FBC; Mon, 7 Nov 2011 13:21:42 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id A6AE71C00056; Mon, 7 Nov 2011 13:21:42 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id oH7ucNp3HjVD; Mon, 7 Nov 2011 13:21:38 +0100 (CET) Received: from hase.home (ppp-93-104-152-211.dynamic.mnet-online.de [93.104.152.211]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 7 Nov 2011 13:21:38 +0100 (CET) From: Andreas Schwab To: Eli Zaretskii Subject: Re: bug#9983: valgrind warning in draw_glyphs References: X-Yow: Yow! Is my fallout shelter termite proof? Date: Mon, 07 Nov 2011 13:21:38 +0100 In-Reply-To: (Eli Zaretskii's message of "Mon, 07 Nov 2011 00:49:07 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9983 Cc: Dan Nicolaescu , 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Eli Zaretskii writes: > The other variables in the line being flagged, `start' and `i', are > also okay: `start' is one of the call arguments Just being an argument does not necessarily make it ok. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 07:47:45 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 12:47:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNOc5-0004uj-DW for submit@debbugs.gnu.org; Mon, 07 Nov 2011 07:47:45 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNOc2-0004ua-Om for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 07:47:43 -0500 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNOZF-0006pn-Pk; Mon, 07 Nov 2011 07:44:49 -0500 From: Dan Nicolaescu To: Eli Zaretskii Subject: Re: bug#9983: valgrind warning in draw_glyphs References: X-Debbugs-No-Ack: yes Date: Mon, 07 Nov 2011 07:44:49 -0500 In-Reply-To: (Dan Nicolaescu's message of "Mon, 07 Nov 2011 06:52:03 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9983 Cc: 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Dan Nicolaescu writes: > Eli Zaretskii writes: > >>> From: Dan Nicolaescu >>> Date: Sun, 06 Nov 2011 23:36:42 -0500 >>> >>> The warning is for this: >>> if (check_mouse_face >>> && mouse_beg_col < start && mouse_end_col > i) >>> >>> it looks like mouse_beg_col and mouse_end_col could be left uninitialized a few lines above. >> >> I don't see how. These variables are initialized in this block: >> >> if (row >= mouse_beg_row && row <= mouse_end_row) >> { >> check_mouse_face = 1; >> mouse_beg_col = (row == mouse_beg_row) >> ? hlinfo->mouse_face_beg_col : 0; >> mouse_end_col = (row == mouse_end_row) >> ? hlinfo->mouse_face_end_col >> : row->used[TEXT_AREA]; >> } >> >> check_mouse_face starts as zero, and is only set to 1 in this block. >> So any test that is conditioned on check_mouse_face being non-zero is >> okay with looking at mouse_beg_col and mouse_end_col. >> >> The other variables in the line being flagged, `start' and `i', are >> also okay: `start' is one of the call arguments and `i' is computed >> right before the line being flagged. >> >> Did I miss something? > > Hmm, you might be right. Telling valgrind to attach gdb at that point: > > (gdb) info local > overlap_hl = > hlinfo = > mouse_beg_col = 0x0 > check_mouse_face = 0x0 > dummy_x = 0x0 > h = > t = > mouse_end_col = 0x50b3a22 > head = 0x7feffe3a0 > tail = 0x7feffe3a0 > s = > clip_head = 0x0 > clip_tail = 0x0 > i = > j = > x_reached = 0x184 > last_x = 0x2ec > area_left = 0x1c > f = 0x5157bf0 > > Maybe a compiler problem, evaluating the && in the wrong order? The assembly in question looks like this: .LBB3664: .loc 1 22981 0 movl -152(%rbp), %ebx cmpl %ebx, -260(%rbp) jge .L7265 movl -192(%rbp), %eax testl %eax, %eax je .L7265 .loc 1 22982 0 movslq -232(%rbp), %rax .loc 1 22985 0 xorl %r14d, %r14d cmpq %rax, -120(%rbp) setl %r14b leal (%r14,%r14,2), %ebx movl %ebx, -144(%rbp) the debugger is stopped on the "jge" line, that means that the "cmpl" lined did the access. (gdb) p/d (long long)&mouse_beg_col - (long long)$rbp $18 = -260 (gdb) p/d (long long)&check_mouse_face - (long long)$rbp $19 = -192 so it looks like check_mouse_face is tested after mouse_beg_col. (unless I'm missing something...) The compiler here is the system compiler on an up to date Fedora15 system. gcc --version gcc (GCC) 4.6.1 20110908 (Red Hat 4.6.1-9) Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 08:02:47 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 13:02:47 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNOqY-0005FG-Jd for submit@debbugs.gnu.org; Mon, 07 Nov 2011 08:02:46 -0500 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNOqS-0005F5-To for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 08:02:41 -0500 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id E2FD41C02FA8; Mon, 7 Nov 2011 13:59:43 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 850071C0018B; Mon, 7 Nov 2011 13:59:43 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id gHA7u51WLPIG; Mon, 7 Nov 2011 13:59:38 +0100 (CET) Received: from hase.home (ppp-93-104-152-211.dynamic.mnet-online.de [93.104.152.211]) by mail.mnet-online.de (Postfix) with ESMTP; Mon, 7 Nov 2011 13:59:37 +0100 (CET) From: Andreas Schwab To: Dan Nicolaescu Subject: Re: bug#9983: valgrind warning in draw_glyphs References: X-Yow: When I met th'POPE back in '58, I scrubbed him with a MILD SOAP or DETERGENT for 15 minutes. He seemed to enjoy it.. Date: Mon, 07 Nov 2011 13:59:37 +0100 In-Reply-To: (Dan Nicolaescu's message of "Mon, 07 Nov 2011 07:44:49 -0500") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 9983 Cc: Eli Zaretskii , 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Dan Nicolaescu writes: > so it looks like check_mouse_face is tested after mouse_beg_col. That is perfectly ok under the as-if rule. See also . Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 10:24:16 2011 Received: (at 9983-close) by debbugs.gnu.org; 7 Nov 2011 15:24:16 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNR3X-0008Td-5F for submit@debbugs.gnu.org; Mon, 07 Nov 2011 10:24:15 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNR3T-0008TV-Jl for 9983-close@debbugs.gnu.org; Mon, 07 Nov 2011 10:24:12 -0500 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNR0g-0006oP-QB; Mon, 07 Nov 2011 10:21:18 -0500 From: Dan Nicolaescu To: Andreas Schwab Subject: Re: bug#9983: valgrind warning in draw_glyphs References: Date: Mon, 07 Nov 2011 10:21:18 -0500 In-Reply-To: (Andreas Schwab's message of "Mon, 07 Nov 2011 13:59:37 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9983-close Cc: Eli Zaretskii , 9983-close@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Andreas Schwab writes: > Dan Nicolaescu writes: > >> so it looks like check_mouse_face is tested after mouse_beg_col. > > That is perfectly ok under the as-if rule. See also Right. Closing this bug then. From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 11:00:44 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 16:00:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNRcm-0000tj-GY for submit@debbugs.gnu.org; Mon, 07 Nov 2011 11:00:44 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNRcg-0000tW-G4 for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 11:00:38 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LUA00B00S59R500@a-mtaout22.012.net.il> for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 17:56:58 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.228.70.69]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LUA00BZNSAX3I70@a-mtaout22.012.net.il>; Mon, 07 Nov 2011 17:56:58 +0200 (IST) Date: Mon, 07 Nov 2011 17:54:56 +0200 From: Eli Zaretskii Subject: Re: bug#9983: valgrind warning in draw_glyphs In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Message-id: <83wrbchqr3.fsf@gnu.org> References: X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 9983 Cc: dann@gnu.org, 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Andreas Schwab > Cc: Eli Zaretskii , 9983@debbugs.gnu.org > Date: Mon, 07 Nov 2011 13:59:37 +0100 > > Dan Nicolaescu writes: > > > so it looks like check_mouse_face is tested after mouse_beg_col. > > That is perfectly ok under the as-if rule. See also > . Where can I find the definition of the "side effects" that would disallow such optimizations? From debbugs-submit-bounces@debbugs.gnu.org Mon Nov 07 11:02:43 2011 Received: (at 9983) by debbugs.gnu.org; 7 Nov 2011 16:02:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNRel-0000wu-LE for submit@debbugs.gnu.org; Mon, 07 Nov 2011 11:02:43 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNRej-0000wm-7v for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 11:02:42 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LUA00E00S6TMS00@a-mtaout20.012.net.il> for 9983@debbugs.gnu.org; Mon, 07 Nov 2011 17:59:10 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.228.70.69]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LUA0088LSEGYA81@a-mtaout20.012.net.il>; Mon, 07 Nov 2011 17:59:10 +0200 (IST) Date: Mon, 07 Nov 2011 17:57:04 +0200 From: Eli Zaretskii Subject: Re: bug#9983: valgrind warning in draw_glyphs In-reply-to: X-012-Sender: halo1@inter.net.il To: Andreas Schwab Message-id: <83vcqwhqnj.fsf@gnu.org> References: X-Spam-Score: -2.0 (--) X-Debbugs-Envelope-To: 9983 Cc: dann@gnu.org, 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.0 (--) > From: Andreas Schwab > Cc: Dan Nicolaescu , 9983@debbugs.gnu.org > Date: Mon, 07 Nov 2011 13:21:38 +0100 > > Eli Zaretskii writes: > > > The other variables in the line being flagged, `start' and `i', are > > also okay: `start' is one of the call arguments > > Just being an argument does not necessarily make it ok. Indeed. I also thought about that, so I checked the callers two levels up, and came up empty-handed. I guess the optimization done by GCC 4.6 fooled valgrind as well. From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 08 09:20:09 2011 Received: (at 9983) by debbugs.gnu.org; 8 Nov 2011 14:20:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNmX2-00027B-Ni for submit@debbugs.gnu.org; Tue, 08 Nov 2011 09:20:09 -0500 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RNmX1-000274-6p for 9983@debbugs.gnu.org; Tue, 08 Nov 2011 09:20:08 -0500 Received: from dann by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RNmU8-0002y4-9H; Tue, 08 Nov 2011 09:17:08 -0500 From: Dan Nicolaescu To: Eli Zaretskii Subject: Re: bug#9983: valgrind warning in draw_glyphs References: <83vcqwhqnj.fsf@gnu.org> Date: Tue, 08 Nov 2011 09:17:08 -0500 In-Reply-To: <83vcqwhqnj.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 07 Nov 2011 17:57:04 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9983 Cc: Andreas Schwab , 9983@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) Eli Zaretskii writes: >> From: Andreas Schwab >> Cc: Dan Nicolaescu , 9983@debbugs.gnu.org >> Date: Mon, 07 Nov 2011 13:21:38 +0100 >> >> Eli Zaretskii writes: >> >> > The other variables in the line being flagged, `start' and `i', are >> > also okay: `start' is one of the call arguments >> >> Just being an argument does not necessarily make it ok. > > Indeed. I also thought about that, so I checked the callers two > levels up, and came up empty-handed. > > I guess the optimization done by GCC 4.6 fooled valgrind as well. Not trying to split hairs, but valgrind wasn't fooled, it did the right thing at the level that valgrind is working at... From unknown Fri Jun 20 03:38:14 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 07 Dec 2011 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator