From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alex Gramiak Newsgroups: gmane.emacs.devel Subject: Warnings when building with LTO Date: Thu, 09 May 2019 16:49:38 -0600 Message-ID: <87imujckfx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="228532"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 10 00:50:34 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOrs2-000xK0-4n for ged-emacs-devel@m.gmane.org; Fri, 10 May 2019 00:50:34 +0200 Original-Received: from localhost ([127.0.0.1]:33771 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOrs0-0001tF-SS for ged-emacs-devel@m.gmane.org; Thu, 09 May 2019 18:50:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37797) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hOrr8-0001rT-Az for emacs-devel@gnu.org; Thu, 09 May 2019 18:49:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hOrr7-0007Nu-7w for emacs-devel@gnu.org; Thu, 09 May 2019 18:49:38 -0400 Original-Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]:40967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hOrr6-0007Ne-UI for emacs-devel@gnu.org; Thu, 09 May 2019 18:49:37 -0400 Original-Received: by mail-pl1-x636.google.com with SMTP id d9so1824705pls.8 for ; Thu, 09 May 2019 15:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:user-agent:date:message-id:mime-version :content-transfer-encoding; bh=CAQ5ITFsJrUB2Db53dEI50Mj1/ScalaQVDyP/V9/cAY=; b=HEOsWuaStmXdR0JYFQl6UA+gWWH9Fkr/4amKrZeCpc0WCwkBawsGLWH/I0Ckq3kPy2 mo4i0uZ/MLtNE0uS0A3xBhDJGvRjlQAdjyp9aNvd8Kle6OhNVbMg4p1w5tgpGLx7n5s3 z8f9d300b15y98pkB1KXi14ZS7uCyqHnwQGQU7tWavlud08c8glADrNodv4mNvMXPunM ZbQpZa0JkXolS4BxNI+yN4VOqkYDEcEFtvh9xNj05T5yq8S2FOJGg6TxeCesiCVwyAER SHRdWE/Gs9VbW6WpgJZvPs0W6oKccyTawV6o/sFIg+mRWs0u+7Hpy940vkrKJ4ISV+o9 IeFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:user-agent:date:message-id :mime-version:content-transfer-encoding; bh=CAQ5ITFsJrUB2Db53dEI50Mj1/ScalaQVDyP/V9/cAY=; b=CEru0IxFd92a4QMwXSck8VDewraFBC3VWaMKrZUjx4Abpl+uPCXZizvbGKDfGKAe0A l2ZCAY8bE+9NE5pI445q0ux273lhlBin3DmBpfxTK7XSSH7JyNhY/v1SgEdjN7AirXfc CYZjophcCh+qaxh95ULmBsmP+59opM/jqAi4FhMe/b3yt0ZbrjSmvJ8RCllRCtWdqOTS mdgpKqeJOESUixBdgT7bSxOHVcmp6twFC1JeK7ko+kdZVELR6KHqsNfu8F/I0x5RbxRr F31eg45SYAFVWN0tdrz6gprxFFS2lo9iWl+35U05YWVD1r+nxA6ofPUOaiVB7Yyivf8s 3/ow== X-Gm-Message-State: APjAAAWZJRlN6rmClBYFXvY45cm55tGJG8n8kmBXnqA+SqKEPXrnEmJ8 Tl+uGuRT12aOGUO5kbFBbOkYeuY5 X-Google-Smtp-Source: APXvYqzO4aXY/qqqzPJc60rerIAa5+5gwCMYN93R61uxHq9OaJm47pEIms9fQyQaJXIhWgKAc2u+yg== X-Received: by 2002:a17:902:8343:: with SMTP id z3mr8710954pln.240.1557442174480; Thu, 09 May 2019 15:49:34 -0700 (PDT) Original-Received: from lylat ([2604:3d09:e37f:1500:1a72:4878:e793:7302]) by smtp.gmail.com with ESMTPSA id v81sm8177811pfa.16.2019.05.09.15.49.33 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 09 May 2019 15:49:33 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::636 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:236348 Archived-At: Also, with OpenSUSE looking to enable LTO by default[1], it would be nice to reevaluate LTO's role in Emacs release builds, at least for modern compilers. INSTALL states: Link time optimization is not the default as it tends to cause crashes and to make Emacs slower. Is this still true with GCC 9.1? Paul, can you still reproduce the bug[2] you mentioned in commit 9b4b2e9fc8 with GCC 9.1? [1] https://hubicka.blogspot.com/2019/05/gcc-9-link-time-and-inter-procedur= al.html [2] https://bugzilla.redhat.com/show_bug.cgi?id=3D1486455 Build warnings when compiling with --enable-link-time-optimization (with GCC 8.3.0): CCLD emacsclient emacsclient.c: In function =E2=80=98local_sockname.constprop=E2=80=99: emacsclient.c:1335:9: warning: =E2=80=98/emacs=E2=80=99 directive output tr= uncated writing 6 bytes into a region of size 1 [-Wformat-truncation=3D] "/emacs%"PRIuMAX"/%s", uid, server_name); ^ emacsclient.c:1335:9: note: using the range [0, 18446744073709551615] for d= irective argument emacsclient.c:1335:9: note: assuming directive output of 1 byte /usr/include/bits/stdio2.h:67:10: note: =E2=80=98__builtin___snprintf_chk= =E2=80=99 output 9 or more bytes (assuming 10) into a destination of size 1 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, CCLD temacs ftfont.c: In function =E2=80=98ftfont_shape=E2=80=99: lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-derefer= ence] EMACS_INT size =3D XBOOL_VECTOR (a)->size; ^ image.c: In function =E2=80=98jpeg_load_body=E2=80=99: image.c:6937:31: warning: variable =E2=80=98specified_data=E2=80=99 might b= e clobbered by =E2=80=98longjmp=E2=80=99 or =E2=80=98vfork=E2=80=99 [-Wclob= bered] Lisp_Object specified_file, specified_data; ^ image.c: In function =E2=80=98png_load_body=E2=80=99: image.c:6160:31: warning: variable =E2=80=98specified_data=E2=80=99 might b= e clobbered by =E2=80=98longjmp=E2=80=99 or =E2=80=98vfork=E2=80=99 [-Wclob= bered] Lisp_Object specified_file, specified_data; ^ image.c:6161:9: warning: variable =E2=80=98fp=E2=80=99 might be clobbered b= y =E2=80=98longjmp=E2=80=99 or =E2=80=98vfork=E2=80=99 [-Wclobbered] FILE *fp =3D NULL; ^ regex-emacs.c: In function =E2=80=98re_match_2_internal=E2=80=99: lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-derefer= ence] EMACS_INT size =3D XBOOL_VECTOR (a)->size; ^ regex-emacs.c: In function =E2=80=98analyze_first=E2=80=99: lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-derefer= ence] EMACS_INT size =3D XBOOL_VECTOR (a)->size; ^ indent.c: In function =E2=80=98position_indentation=E2=80=99: lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-derefer= ence] EMACS_INT size =3D XBOOL_VECTOR (a)->size; ^ indent.c: In function =E2=80=98Fvertical_motion=E2=80=99: bignum.c:65:40: warning: =E2=80=98lcols=E2=80=99 may be used uninitialized = in this function [-Wmaybe-uninitialized] return mpz_get_d_rounded (XBIGNUM (n)->value); ^ indent.c:2094:15: note: =E2=80=98lcols=E2=80=99 was declared here Lisp_Object lcols; ^ keyboard.c: In function =E2=80=98read_char=E2=80=99: keyboard.c:2314:13: warning: =E2=80=98jmpcount=E2=80=99 may be used uniniti= alized in this function [-Wmaybe-uninitialized] ptrdiff_t jmpcount; ^ bytecode.c: In function =E2=80=98exec_byte_code=E2=80=99: bytecode.c:367:9: warning: variable =E2=80=98alloc=E2=80=99 might be clobbe= red by =E2=80=98longjmp=E2=80=99 or =E2=80=98vfork=E2=80=99 [-Wclobbered] void *alloc;