From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 07:18:29 2021 Received: (at submit) by debbugs.gnu.org; 7 Oct 2021 11:18:29 +0000 Received: from localhost ([127.0.0.1]:46190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYRPw-0004pV-Uq for submit@debbugs.gnu.org; Thu, 07 Oct 2021 07:18:29 -0400 Received: from lists.gnu.org ([209.51.188.17]:40634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYRPu-0004pM-TR for submit@debbugs.gnu.org; Thu, 07 Oct 2021 07:18:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYRPu-0001CY-Fv for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 07:18:26 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:45783) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mYRPn-0002WO-37 for bug-gnu-emacs@gnu.org; Thu, 07 Oct 2021 07:18:26 -0400 Received: by mail-wr1-x432.google.com with SMTP id r10so17955123wra.12 for ; Thu, 07 Oct 2021 04:18:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=X1JnGy4foxVdC19tBSaCLcVT/baPctJ1SkIjMnD8LCs=; b=SfyqfQWckJcTPP06jK7kFXTi41w/vyxyNKTWHfIHXg2UTM/ddVYZanlbzevzeA6Fcj InJN7w7SCGQpGIKGGEVcmVvfHTzb54M+PsDsKlTVm1CoNQzpPVUOnIdn3Pw3EH84EKwS hUqRJlK5OwVV3C2+hFiF9LDbizpRQrVWD40gAS+8XSbTT2/e+tcjWyyolwqG9TIMXdJK Gtx5wCDgVdazJ01e+1lTqEEMo5m4gpciG2HjwuxCFhJ8d6TtrP+F/boOnAt3L2kUXBo9 IPq8qqmRxiglleyq+cYCTVRjELRtDR608WvbtMvL49QvKvohWqXXejHy4iAtF3o5C6fP mdwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=X1JnGy4foxVdC19tBSaCLcVT/baPctJ1SkIjMnD8LCs=; b=mlEhjBvEbIeLV6VX4RSj6WU4YZMEKf+uwc4+aELl7HEbxsbMfJ3cQcXMt6jO5WXFqC hlbETqT1m6kH0HcB50nFJjdNsKtvk5ky1gM5ygE0Tc2dUJt+Z/k4cptPUWMJhNQtfND+ 2TVmvyaW/Y4rGFF3LPmYK0cHlX8446CKlq3+wtxZF3vZYbMEqemxUOkySq+MJEWb9YLF lqA6l1ekVLwkxXtk0ju8Ne5LdyumJuZ6kxgVlQGc2U6B3v9LpBFEOKMMAiCJKTG2CaTI 923jLM9slgAs+SSIr5MVLVGpE+tYvg4+JayferAbzNkAzYfsmdOzjnu99RGk6PR/QZH7 P/XA== X-Gm-Message-State: AOAM531UF6HEPuPSyWjcJhapQEJLeuxvIhhiOtkRvCbLxNOZ2IA/M4F9 NgU5DB6xAl5thzEEoR3rPVVnQgIC1X1T7Q== X-Google-Smtp-Source: ABdhPJwjPrShlDlTuyPyabAluPWKMDtWfIyFgDUFkBick8sL9AxRF4OtoKaMoX2tKXRKJdV3wk9U4Q== X-Received: by 2002:a05:6000:1567:: with SMTP id 7mr4639865wrz.408.1633605495531; Thu, 07 Oct 2021 04:18:15 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id o6sm6124951wri.49.2021.10.07.04.18.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Oct 2021 04:18:15 -0700 (PDT) From: "Basil L. Contovounesios" To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Uninitialised variable warning in src/term.c X-Debbugs-Cc: Paul Eggert Date: Thu, 07 Oct 2021 12:18:14 +0100 Message-ID: <87zgrl2idl.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=contovob@tcd.ie; helo=mail-wr1-x432.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) Severity: minor I'm currently seeing the following warning with GCC 10.3.0: In file included from term.c:30: term.c: In function =E2=80=98encode_terminal_code=E2=80=99: lisp.h:1853:35: warning: =E2=80=98gstring=E2=80=99 may be used uninitialize= d in this function [-Wmaybe-uninitialized] 1853 | return XVECTOR (array)->contents[idx]; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ term.c:553:16: note: =E2=80=98gstring=E2=80=99 was declared here 553 | Lisp_Object gstring; | ^~~~~~~ I'm guessing it started with the following recent change: Remove encode_terminal_code UNINITs 7e871dcd27 2021-10-03 17:52:28 -0700 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=3D7e871dcd27 What's the best way to pacify it? Do we care about doing so in GCC 10? Is cmp =3D composition_table[src->u.cmp.id]; indeed guaranteed to be non-NULL? If so, maybe gstring could be initialised as nil and then easserted as non-nil in the !cmp branch (eassuming cmp is non-NULL in the !src->u.cmp.automatic branch does not make the warning go away). If not, could there indeed be a bug? Thanks, --=20 Basil In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo versio= n 1.16.0, Xaw3d scroll bars) of 2021-10-07 built on tia Repository revision: e338effc774f9a7cfe13d4a35dc1cf493a22c972 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure 'CC=3Dccache gcc' 'CFLAGS=3D-Og -ggdb3' --config-cache --prefix /home/blc/.local --enable-checking=3Dstructs --with-x-toolkit=3Dlucid --with-file-notification=3Dyes --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=3Dibus locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date seq gv subr-x byte-opt bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 50810 6940) (symbols 48 6621 1) (strings 32 18974 1858) (string-bytes 1 613497) (vectors 16 13616) (vector-slots 8 184446 10452) (floats 8 23 47) (intervals 56 231 0) (buffers 992 10)) From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 09:02:12 2021 Received: (at 51075) by debbugs.gnu.org; 7 Oct 2021 13:02:12 +0000 Received: from localhost ([127.0.0.1]:46346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYT2K-0001FJ-81 for submit@debbugs.gnu.org; Thu, 07 Oct 2021 09:02:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:52332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYT2H-0001F6-Ua for 51075@debbugs.gnu.org; Thu, 07 Oct 2021 09:02:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35766) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYT2B-0005XW-CD; Thu, 07 Oct 2021 09:02:03 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4933 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYT2A-0001yb-2k; Thu, 07 Oct 2021 09:02:03 -0400 Date: Thu, 07 Oct 2021 16:01:58 +0300 Message-Id: <8335pd0z09.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-Reply-To: <87zgrl2idl.fsf@tcd.ie> (bug-gnu-emacs@gnu.org) Subject: Re: bug#51075: 29.0.50; Uninitialised variable warning in src/term.c References: <87zgrl2idl.fsf@tcd.ie> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51075 Cc: 51075@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: Paul Eggert > Date: Thu, 07 Oct 2021 12:18:14 +0100 > From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > I'm currently seeing the following warning with GCC 10.3.0: > > In file included from term.c:30: > term.c: In function ‘encode_terminal_code’: > lisp.h:1853:35: warning: ‘gstring’ may be used uninitialized in this function [-Wmaybe-uninitialized] > 1853 | return XVECTOR (array)->contents[idx]; > | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~ > term.c:553:16: note: ‘gstring’ was declared here > 553 | Lisp_Object gstring; > | ^~~~~~~ It's a bogus warning. It might be worth reporting to the GCC folks (unless GCC 11 already fixed that). > Is > > cmp = composition_table[src->u.cmp.id]; > > indeed guaranteed to be non-NULL? If it's ever NULL, the very next line will segfault: cmp = composition_table[src->u.cmp.id]; required = cmp->glyph_len; > If so, maybe gstring could be > initialised as nil and then easserted as non-nil in the !cmp branch > (eassuming cmp is non-NULL in the !src->u.cmp.automatic branch does not > make the warning go away). If not, could there indeed be a bug? Feel free to assign some value to gstring in the 'else' clause, to shut up GCC in this case. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 07 16:13:48 2021 Received: (at 51075-done) by debbugs.gnu.org; 7 Oct 2021 20:13:48 +0000 Received: from localhost ([127.0.0.1]:48481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYZm0-0004RO-Hf for submit@debbugs.gnu.org; Thu, 07 Oct 2021 16:13:48 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:60440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYZly-0004RA-5O for 51075-done@debbugs.gnu.org; Thu, 07 Oct 2021 16:13:47 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B5F69160117; Thu, 7 Oct 2021 13:13:40 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id frjXvFZnGeTn; Thu, 7 Oct 2021 13:13:39 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DD105160115; Thu, 7 Oct 2021 13:13:39 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UOi_Nwd1UKx0; Thu, 7 Oct 2021 13:13:39 -0700 (PDT) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A339D16011C; Thu, 7 Oct 2021 13:13:39 -0700 (PDT) Content-Type: multipart/mixed; boundary="------------tQU3DWTXOIAnr4yuayaFE3oL" Message-ID: <421a1f09-6b02-0e36-3763-010a21b3f39c@cs.ucla.edu> Date: Thu, 7 Oct 2021 13:13:33 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: bug#51075: 29.0.50; Uninitialised variable warning in src/term.c Content-Language: en-US To: Eli Zaretskii , "Basil L. Contovounesios" References: <87zgrl2idl.fsf@tcd.ie> <8335pd0z09.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <8335pd0z09.fsf@gnu.org> X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 51075-done Cc: 51075-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) This is a multi-part message in MIME format. --------------tQU3DWTXOIAnr4yuayaFE3oL Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/7/21 06:01, Eli Zaretskii wrote: > It's a bogus warning. It might be worth reporting to the GCC folks > (unless GCC 11 already fixed that). Yes, I believed it's fixed in GCC 11. GCC 11.2.1 20210728 (Red Hat 11.2.1-1) does not warn me about it. > Feel free to assign some value to gstring in the 'else' clause, to > shut up GCC in this case. I installed into the emacs-28 branch the attached, which fixes it in a different way to make it a bit clearer to the reader that we're pacifying an inadequate compiler rather than executing odd code for an unknown reason. There are a handful of other bogus warnings with GCC 11.2.1, which I'll try to get around to pacifying (I hope before GCC 12 comes out :-). --------------tQU3DWTXOIAnr4yuayaFE3oL Content-Type: text/x-patch; charset=UTF-8; name="0001-Pacify-GCC-10.3-Wmaybe-uninitialized.patch" Content-Disposition: attachment; filename="0001-Pacify-GCC-10.3-Wmaybe-uninitialized.patch" Content-Transfer-Encoding: base64 RnJvbSBhYzdiZDNmM2VjMWQxMmVhMjU1MzEyNzc4ZDViZTY3NGU1ZmJlMjkzIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBUaHUsIDcgT2N0IDIwMjEgMTM6MDk6MTkgLTA3MDAKU3ViamVjdDogW1BBVENI XSBQYWNpZnkgR0NDIDEwLjMgLVdtYXliZS11bmluaXRpYWxpemVkCgpQcm9ibGVtIHJlcG9y dGVkIGJ5IEJhc2lsIEwuIENvbnRvdm91bmVzaW9zIChCdWcjNTEwNzUpLgoqIHNyYy90ZXJt LmMgKGVuY29kZV90ZXJtaW5hbF9jb2RlKToKQWRkIGFuIFVOSU5JVCB0byBwYWNpZnkgR0ND IDEwIGJ1Zy4KLS0tCiBzcmMvdGVybS5jIHwgMiArLQogMSBmaWxlIGNoYW5nZWQsIDEgaW5z ZXJ0aW9uKCspLCAxIGRlbGV0aW9uKC0pCgpkaWZmIC0tZ2l0IGEvc3JjL3Rlcm0uYyBiL3Ny Yy90ZXJtLmMKaW5kZXggMDg1OGY4MTY4NS4uNmYwYjgyN2NmYyAxMDA2NDQKLS0tIGEvc3Jj L3Rlcm0uYworKysgYi9zcmMvdGVybS5jCkBAIC01NTAsNyArNTUwLDcgQEAgZW5jb2RlX3Rl cm1pbmFsX2NvZGUgKHN0cnVjdCBnbHlwaCAqc3JjLCBpbnQgc3JjX2xlbiwKICAgICAgIGlm IChzcmMtPnR5cGUgPT0gQ09NUE9TSVRFX0dMWVBIKQogCXsKIAkgIHN0cnVjdCBjb21wb3Np dGlvbiAqY21wOwotCSAgTGlzcF9PYmplY3QgZ3N0cmluZzsKKwkgIExpc3BfT2JqZWN0IGdz dHJpbmcgVU5JTklUOwogCSAgaW50IGk7CiAKIAkgIG5ieXRlcyA9IGJ1ZiAtIGVuY29kZV90 ZXJtaW5hbF9zcmM7Ci0tIAoyLjMxLjEKCg== --------------tQU3DWTXOIAnr4yuayaFE3oL-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 08 06:21:12 2021 Received: (at 51075) by debbugs.gnu.org; 8 Oct 2021 10:21:12 +0000 Received: from localhost ([127.0.0.1]:49282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYn04-0002wa-8f for submit@debbugs.gnu.org; Fri, 08 Oct 2021 06:21:12 -0400 Received: from mail-wr1-f51.google.com ([209.85.221.51]:44971) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYn02-0002w8-7P for 51075@debbugs.gnu.org; Fri, 08 Oct 2021 06:21:10 -0400 Received: by mail-wr1-f51.google.com with SMTP id s15so28288646wrv.11 for <51075@debbugs.gnu.org>; Fri, 08 Oct 2021 03:21:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=UqK27ca0/F2MWvVu9FcflSm7wLwNL8i5NG3+qo4oka8=; b=ZdLANddHjfQoDSQ9g25bHtRkllAT/96Zx+OomGFob+XzQ2TzJD27FZlEjbTGu8iKfW qesRw5cuJpBvfuvqUFWo+/T7pB0pi33+U3D6WHFLODq+7kXc/l7CIfk3dsUWEdcDly7A 3LaZrlfyDIAomOemDjBwHb2reHQgW7DDhXKwFgXfMa8eVvJHvED7mkWcjb7DjXtkxIRS 3OC2r6r8TI9nKBrU2Ms2eVmbBLzy0UKODj938JTs4noizyzVvqb5WJhozbFsbhk5O+gR u7YBn40TmczrurHpLaqOtrE/9vzcu/ZxVxgPkmxMkN0HVAyJtUo3XXP9H69h1h9b+gwQ C3jA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=UqK27ca0/F2MWvVu9FcflSm7wLwNL8i5NG3+qo4oka8=; b=czL7sIQcxIB9YQFw39vGr4dN42OFlscRxH+SAClP/H2YeYxHnhI7XI9UVZRoNzATlF PysVka2mWTATOaAyskO5EZRCsptQOnduzAI/zG3qpWeiDNDr0fXQqLEg/dSy3VZXllt5 EsW9+XkfJYVs/LYB6x3/ZtG4LT40OdFwdhz2do9FreGCTcx+lNzL7DvSi3cVvTlb3xWV +wGR9Fhg7hYg5ajRDHPYYzwxWoKpgd8F3GWqeKr/GehNqhhAmEWQs9lYf+c6OruTnwc0 3wm+qdRmNINF69H0ICMSTMc92ldubcYPALNS5EZXp0Td57MiaAzoqvyocXcdI7jS7NJw ze6g== X-Gm-Message-State: AOAM53147R5yvy9Xx6Q04jJUr7+Rw00SaBA9scBAljt5JMJXt7uXEWIK oShi2zKl69gN/4UCH68ZHKkv/upWkkEybg== X-Google-Smtp-Source: ABdhPJxZt2v8IlW21HwPkwMiXi9HLHXYjNmd0KRaqdsNaml8AJbN5e6f7rheLoY4+4dyuOA17H2tZQ== X-Received: by 2002:a7b:c4d3:: with SMTP id g19mr2529085wmk.153.1633688464624; Fri, 08 Oct 2021 03:21:04 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id y8sm2012774wrr.21.2021.10.08.03.21.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 03:21:04 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#51075: 29.0.50; Uninitialised variable warning in src/term.c References: <87zgrl2idl.fsf@tcd.ie> <8335pd0z09.fsf@gnu.org> Date: Fri, 08 Oct 2021 11:21:02 +0100 In-Reply-To: <8335pd0z09.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 Oct 2021 09:02:03 -0400") Message-ID: <877denom0h.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51075 Cc: 51075@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii [2021-10-07 09:02 -0400] wrote: >> Cc: Paul Eggert >> Date: Thu, 07 Oct 2021 12:18:14 +0100 >> From: "Basil L. Contovounesios" via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> Is >> >> cmp = composition_table[src->u.cmp.id]; >> >> indeed guaranteed to be non-NULL? > > If it's ever NULL, the very next line will segfault: > > cmp = composition_table[src->u.cmp.id]; > required = cmp->glyph_len; Right, I didn't read carefully enough. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 08 06:21:20 2021 Received: (at 51075) by debbugs.gnu.org; 8 Oct 2021 10:21:20 +0000 Received: from localhost ([127.0.0.1]:49286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYn0C-0002wv-Hg for submit@debbugs.gnu.org; Fri, 08 Oct 2021 06:21:20 -0400 Received: from mail-wr1-f44.google.com ([209.85.221.44]:33727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mYn0A-0002wh-AH for 51075@debbugs.gnu.org; Fri, 08 Oct 2021 06:21:18 -0400 Received: by mail-wr1-f44.google.com with SMTP id m22so28327011wrb.0 for <51075@debbugs.gnu.org>; Fri, 08 Oct 2021 03:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=VeBCANOqxoajQ4SPyDG324ArSF0xIaNMQoX3c7Np7j0=; b=GXgXgJR+HBSu8zz8DVLQxQwStgfCWK4NA9+hB33GQF9Er6h25YwOqn53o9WfkzSdD0 lIbZdym2OB0DjYdu+f/Hvyy00qozREwpWO0uDGqKH8IyAej/NyyJtYqVdaDOBrXBBhse c1vHgJDevFVoxfugtaGzaPtbceHwolJrfMQPoUYGZL7zJf+AamGDERv1dxtSsdf00mLH PIO5Hms4vn8g0wFK2EABFau30IJG5fHtvgLc6BKIucXp/ydRHBowfomOFNJtdcasXPj6 X7EzoFUPXs4j+h6W3ymaW8bi/NXRS7OzAihzilrNjuenAjspg+jKgYSsibe6H65zY4UM nVCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=VeBCANOqxoajQ4SPyDG324ArSF0xIaNMQoX3c7Np7j0=; b=TpzEaR6qZtols0npQxM70KQYQxdBT56z6VGW4p9rH3jQdivGRMrR2nNOpRu6mJpdap zEMEOPJ7yZQIu6XenfMC9CWVE2aGZ/nMM9mXYDUELMitY+5oU5+lMKRJO5IbGYw13JpY JWeJpTMKyf2DmhvqVLgCGDxlZ21oMDg0fT3wEGy6a91s6NUICGK3EKTpUbUvDDyLh4Ux c9WkzMZy8ohnyeaCdComFut9PLwWU9TpD7ZUe0++0ArEx8FUIZyF6mZ9e3VGO6T6sg0w pRZotbivNfN1PZfhyDfJXdbzvluxP/dr6+PM+yvIu+Ci0hEEPVmlA4Jyv1+qBJUgLWpe qQpw== X-Gm-Message-State: AOAM532AAJWXeeZnJfb2uMnKG35A+wsmYS+iivdYDhscdU6ydOvxD/mB agS4wmRdrn1fd8RBUR22D1Ct5ASczoaZbQ== X-Google-Smtp-Source: ABdhPJw0F+SHwwa3lCXvS+L3MQ2UJTMeOVfjpkEv8KaUc6x0f61YWs4kwdgcHlZacJSCqdPSd2f2PA== X-Received: by 2002:adf:9787:: with SMTP id s7mr2831863wrb.191.1633688472762; Fri, 08 Oct 2021 03:21:12 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id c77sm2184317wme.48.2021.10.08.03.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 03:21:12 -0700 (PDT) From: "Basil L. Contovounesios" To: Paul Eggert Subject: Re: bug#51075: 29.0.50; Uninitialised variable warning in src/term.c References: <87zgrl2idl.fsf@tcd.ie> <8335pd0z09.fsf@gnu.org> <421a1f09-6b02-0e36-3763-010a21b3f39c@cs.ucla.edu> Date: Fri, 08 Oct 2021 11:21:11 +0100 In-Reply-To: <421a1f09-6b02-0e36-3763-010a21b3f39c@cs.ucla.edu> (Paul Eggert's message of "Thu, 7 Oct 2021 13:13:33 -0700") Message-ID: <875yu7om08.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 51075 Cc: 51075@debbugs.gnu.org, Eli Zaretskii X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Paul Eggert [2021-10-07 13:13 -0700] wrote: > On 10/7/21 06:01, Eli Zaretskii wrote: > >> It's a bogus warning. It might be worth reporting to the GCC folks >> (unless GCC 11 already fixed that). > > Yes, I believed it's fixed in GCC 11. GCC 11.2.1 20210728 (Red Hat 11.2.1-1) > does not warn me about it. > >> Feel free to assign some value to gstring in the 'else' clause, to >> shut up GCC in this case. > > I installed into the emacs-28 branch the attached, which fixes it in a different > way to make it a bit clearer to the reader that we're pacifying an inadequate > compiler rather than executing odd code for an unknown reason. > > There are a handful of other bogus warnings with GCC 11.2.1, which I'll try to > get around to pacifying (I hope before GCC 12 comes out :-). Thanks! -- Basil From unknown Fri Sep 05 11:00:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Nov 2021 11:24:10 +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