zsh-workers
 help / color / mirror / code / Atom feed
* 5.8: LTO exposes some new issues
@ 2020-07-21 23:41 Tomasz Kłoczko
  2020-07-22  5:59 ` Daniel Shahaf
  0 siblings, 1 reply; 20+ messages in thread
From: Tomasz Kłoczko @ 2020-07-21 23:41 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 3473 bytes --]

Hi

Looks like by using LTO is possible to expose new source code issues.
Also looks like zsh still is using  mktemp()

gcc -Wl,-z,relro -Wl,--as-needed  -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto
-flto-partition=none -fuse-linker-plugin  -rdynamic -o zsh main.o  `cat
stamp-modobjs`   -lpcre -ldl -lncursesw -ltinfo -lrt -lm  -lc
hist.epro:19:18: warning: type of 'histtab' does not match original
declaration [-Wlto-type-mismatch]
   19 | extern HashTable histtab;
      |                  ^
hist.c:101:11: note: 'histtab' was previously declared here
  101 | HashTable histtab;
      |           ^
hist.c:101:11: note: code may be misoptimized unless '-fno-strict-aliasing'
is used
hashtable.epro:21:38: warning: type of 'cmdnamtab' does not match original
declaration [-Wlto-type-mismatch]
   21 | extern mod_import_variable HashTable cmdnamtab;
      |                                      ^
hashtable.c:585:22: note: 'cmdnamtab' was previously declared here
  585 | mod_export HashTable cmdnamtab;
      |                      ^
hashtable.c:585:22: note: code may be misoptimized unless
'-fno-strict-aliasing' is used
hashtable.epro:33:38: warning: type of 'aliastab' does not match original
declaration [-Wlto-type-mismatch]
   33 | extern mod_import_variable HashTable aliastab;
      |                                      ^
hashtable.c:1172:22: note: 'aliastab' was previously declared here
 1172 | mod_export HashTable aliastab;
      |                      ^
hashtable.c:1172:22: note: code may be misoptimized unless
'-fno-strict-aliasing' is used
hashtable.epro:34:38: warning: type of 'sufaliastab' does not match
original declaration [-Wlto-type-mismatch]
   34 | extern mod_import_variable HashTable sufaliastab;
      |                                      ^
hashtable.c:1177:22: note: 'sufaliastab' was previously declared here
 1177 | mod_export HashTable sufaliastab;
      |                      ^
hashtable.c:1177:22: note: code may be misoptimized unless
'-fno-strict-aliasing' is used
hashtable.epro:31:38: warning: type of 'reswdtab' does not match original
declaration [-Wlto-type-mismatch]
   31 | extern mod_import_variable HashTable reswdtab;
      |                                      ^
hashtable.c:1109:22: note: 'reswdtab' was previously declared here
 1109 | mod_export HashTable reswdtab;
      |                      ^
hashtable.c:1109:22: note: code may be misoptimized unless
'-fno-strict-aliasing' is used
hashtable.epro:25:38: warning: type of 'shfunctab' does not match original
declaration [-Wlto-type-mismatch]
   25 | extern mod_import_variable HashTable shfunctab;
      |                                      ^
hashtable.c:803:22: note: 'shfunctab' was previously declared here
  803 | mod_export HashTable shfunctab;
      |                      ^
hashtable.c:803:22: note: code may be misoptimized unless
'-fno-strict-aliasing' is used
utils.c: In function 'getkeystring':
lto1: warning: function may return address of local variable
[-Wreturn-local-addr]
utils.c:6644:16: note: declared here
 6644 |     char *buf, tmp[1];
      |                ^
/usr/bin/ld: zsh.lto.o: in function `gettempname':
/home/tkloczko/rpmbuild/BUILD/zsh-5.8/Src/utils.c:2226: warning: the use of
`mktemp' is dangerous, better use `mkstemp' or `mkdtemp'

kloczek
-- 
Tomasz Kłoczko | LinkedIn: *http://lnkd.in/FXPWxH <http://lnkd.in/FXPWxH>*

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2020-07-28 11:51 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21 23:41 5.8: LTO exposes some new issues Tomasz Kłoczko
2020-07-22  5:59 ` Daniel Shahaf
2020-07-25 17:43   ` Bart Schaefer
     [not found]     ` <CABB28CxSD5w-SY-iCVYuQ4kJfBpNJOWhpk4HOrS1DNPfMVztgw@mail.gmail.com>
2020-07-25 20:05       ` Fwd: " Bart Schaefer
2020-07-27  2:12         ` Daniel Shahaf
2020-07-27 10:07           ` Tomasz Kłoczko
2020-07-27 11:09             ` Roman Perepelitsa
2020-07-27 12:19               ` Roman Perepelitsa
2020-07-27 12:46                 ` Tomasz Kłoczko
2020-07-27 14:13                   ` Roman Perepelitsa
2020-07-27 14:19                   ` Roman Perepelitsa
2020-07-28  8:09                     ` Daniel Shahaf
2020-07-28 10:55                     ` Fwd: " Roman Perepelitsa
2020-07-28  8:19                   ` Daniel Shahaf
2020-07-28  7:53                 ` Daniel Shahaf
2020-07-28  8:25                   ` Peter Stephenson
2020-07-28 10:52                     ` Roman Perepelitsa
2020-07-28 11:19                       ` Daniel Shahaf
2020-07-28 11:31                         ` Roman Perepelitsa
2020-07-28 11:51                           ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).