From: Alex Gramiak <agrambot@gmail.com>
To: emacs-devel@gnu.org
Subject: Warnings when building with LTO
Date: Thu, 09 May 2019 16:49:38 -0600 [thread overview]
Message-ID: <87imujckfx.fsf@gmail.com> (raw)
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-procedural.html
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1486455
Build warnings when compiling with --enable-link-time-optimization (with
GCC 8.3.0):
CCLD emacsclient
emacsclient.c: In function ‘local_sockname.constprop’:
emacsclient.c:1335:9: warning: ‘/emacs’ directive output truncated writing 6 bytes into a region of size 1 [-Wformat-truncation=]
"/emacs%"PRIuMAX"/%s", uid, server_name);
^
emacsclient.c:1335:9: note: using the range [0, 18446744073709551615] for directive argument
emacsclient.c:1335:9: note: assuming directive output of 1 byte
/usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ 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 ‘ftfont_shape’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
image.c: In function ‘jpeg_load_body’:
image.c:6937:31: warning: variable ‘specified_data’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
Lisp_Object specified_file, specified_data;
^
image.c: In function ‘png_load_body’:
image.c:6160:31: warning: variable ‘specified_data’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
Lisp_Object specified_file, specified_data;
^
image.c:6161:9: warning: variable ‘fp’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
FILE *fp = NULL;
^
regex-emacs.c: In function ‘re_match_2_internal’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
regex-emacs.c: In function ‘analyze_first’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
indent.c: In function ‘position_indentation’:
lisp.h:1772:13: warning: potential null pointer dereference [-Wnull-dereference]
EMACS_INT size = XBOOL_VECTOR (a)->size;
^
indent.c: In function ‘Fvertical_motion’:
bignum.c:65:40: warning: ‘lcols’ may be used uninitialized in this function [-Wmaybe-uninitialized]
return mpz_get_d_rounded (XBIGNUM (n)->value);
^
indent.c:2094:15: note: ‘lcols’ was declared here
Lisp_Object lcols;
^
keyboard.c: In function ‘read_char’:
keyboard.c:2314:13: warning: ‘jmpcount’ may be used uninitialized in this function [-Wmaybe-uninitialized]
ptrdiff_t jmpcount;
^
bytecode.c: In function ‘exec_byte_code’:
bytecode.c:367:9: warning: variable ‘alloc’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Wclobbered]
void *alloc;
next reply other threads:[~2019-05-09 22:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-09 22:49 Alex Gramiak [this message]
2019-05-10 7:23 ` Warnings when building with LTO Paul Eggert
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=87imujckfx.fsf@gmail.com \
--to=agrambot@gmail.com \
--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.