[opensuse-factory] warning deviations in Leap vs. Factory builds with gcc
[automatic line breaks disabled intentionally] Hi, today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package: https://build.opensuse.org/package/show/network:telephony/hylafax+ These two warnings in Leap 15.2[1]: [ 159s] /usr/bin/gcc -D__ANSI_CPP__ -I. -I.. -I.././util -I.././util -L/usr/include -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fpic -O -o faxconfig .././util/faxconfig.c -L../util -L../faxd ../util/libfaxutil.so.7.0.1 ../util/libfaxutil.so.7.0.1 -ltiff -lz ../port/libport.a -lcrypt -lutil -lm -lpam -ljbig -ljpeg -llcms2 -lldap -llber -lresolv [ 159s] .././util/faxconfig.c: In function 'main': [ 159s] .././util/faxconfig.c:90:58: warning: '__builtin___snprintf_chk' output may be truncated before the last format character [-Wformat-truncation=] [ 159s] snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO, [ 159s] ^ [ 159s] In file included from /usr/include/stdio.h:862:0, [ 159s] from .././util/faxconfig.c:26: [ 159s] /usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 6 and 81 bytes into a destination of size 80 [ 159s] return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, [ 159s] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 159s] __bos (__s), __fmt, __va_arg_pack ()); [ 159s] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 160s] /usr/bin/gcc -D__ANSI_CPP__ -I. -I.. -I.././util -I.././util -L/usr/include -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fpic -O -o faxstate .././util/faxstate.c -L../util -L../faxd ../util/libfaxutil.so.7.0.1 ../util/libfaxutil.so.7.0.1 -ltiff -lz ../port/libport.a -lcrypt -lutil -lm -lpam -ljbig -ljpeg -llcms2 -lldap -llber -lresolv [ 160s] .././util/faxstate.c: In function 'main': [ 160s] .././util/faxstate.c:142:54: warning: '__builtin___snprintf_chk' output may be truncated before the last format character [-Wformat-truncation=] [ 160s] snprintf(fifoname, sizeof(fifoname), "%s.%.*s", FAX_FIFO, [ 160s] ^ [ 160s] In file included from /usr/include/stdio.h:862:0, [ 160s] from .././util/faxstate.c:25: [ 160s] /usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 6 and 257 bytes into a destination of size 256 [ 160s] return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, [ 160s] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [ 160s] __bos (__s), __fmt, __va_arg_pack ()); [ 160s] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ are missing in Factory[2]. I would have expected them at timestamp [102s]. My question is, where this deviation originates? Thanks, Pete [1] https://build.opensuse.org/public/build/network:telephony/openSUSE_Leap_15.2... [2] https://build.opensuse.org/public/build/network:telephony/openSUSE_Factory/x... -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, 2019-12-06 at 11:00 +0100, Hans-Peter Jansen wrote:
[automatic line breaks disabled intentionally]
Hi,
today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package:
https://build.opensuse.org/package/show/network:telephony/hylafax+
My question is, where this deviation originates?
Tumbleweed is built using GCC 9 Leap 15 and its service packs are built using GCC 7 I would never expect them to act identically -- Richard Brown Linux Distribution Engineer - Future Technology Team Phone +4991174053-361 SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, D-90409 Nuernberg (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Friday, 6 December 2019 11:00 Hans-Peter Jansen wrote:
today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package:
https://build.opensuse.org/package/show/network:telephony/hylafax+
These two warnings in Leap 15.2[1]:
...
My question is, where this deviation originates?
My guess would be gcc 9.2 (Factory) vs. gcc 7.4 (15.2). Michal Kubecek -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Freitag, 6. Dezember 2019, 11:14:35 CET schrieb Michal Kubecek:
On Friday, 6 December 2019 11:00 Hans-Peter Jansen wrote:
today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package:
https://build.opensuse.org/package/show/network:telephony/hylafax+
These two warnings in Leap 15.2[1]: ...
My question is, where this deviation originates?
My guess would be gcc 9.2 (Factory) vs. gcc 7.4 (15.2).
Thanks Michal, but what happened to these underlying potential overflows then? Does gcc fix them silently, or do they still exist, but these warnings vanished? The former would be questionable, while the latter would be a severe regression. Cheers, Pete -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Fri, Dec 06, 2019 at 11:43:29AM +0100, Hans-Peter Jansen wrote:
Am Freitag, 6. Dezember 2019, 11:14:35 CET schrieb Michal Kubecek:
On Friday, 6 December 2019 11:00 Hans-Peter Jansen wrote:
today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package:
https://build.opensuse.org/package/show/network:telephony/hylafax+
These two warnings in Leap 15.2[1]: ...
My question is, where this deviation originates?
My guess would be gcc 9.2 (Factory) vs. gcc 7.4 (15.2).
Thanks Michal, but what happened to these underlying potential overflows then? Does gcc fix them silently, or do they still exist, but these warnings vanished?
Or they were false positives. That happens too. Thanks Michal -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am 06.12.19 um 11:54 schrieb Michal Suchánek:
On Fri, Dec 06, 2019 at 11:43:29AM +0100, Hans-Peter Jansen wrote:
Am Freitag, 6. Dezember 2019, 11:14:35 CET schrieb Michal Kubecek:
On Friday, 6 December 2019 11:00 Hans-Peter Jansen wrote:
today, I noticed some deviations of warnings between Leap and Factory package builds with gcc. E.g. for this package:
https://build.opensuse.org/package/show/network:telephony/hylafax+
These two warnings in Leap 15.2[1]: ...
My question is, where this deviation originates?
My guess would be gcc 9.2 (Factory) vs. gcc 7.4 (15.2).
Thanks Michal, but what happened to these underlying potential overflows then? Does gcc fix them silently, or do they still exist, but these warnings vanished?
Or they were false positives. That happens too.
Thanks
Michal
Some GCC warnings come from its middle end and hence depend on which optimizations the compiler was able to carry out. See [1] which lists -Wformat-overflow as one of them. Such warnings can appear or disappear randomly based on the optimization flags you use and obviously the compiler version. There are, as far as I know, no real guarantees about them. The upside of middle-end warnings is that the compiler can do some static analysis efficiently across function boundaries (whereas frontend warnings usually only look at a single function), but you pay for that with unreliability. Also the analysis works on the compiler's IR instead of the C/C++ abstract machine. Best regards, Aaron [1] <https://developers.redhat.com/blog/2019/03/13/understanding-gcc-warnings-part-2/> -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (5)
-
Aaron Puchert
-
Hans-Peter Jansen
-
Michal Kubecek
-
Michal Suchánek
-
Richard Brown