Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1655495
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: sparc gcc 7.1 compile issue |
| Date | 2017-06-01 18:50 +0200 |
| Message-ID | <tNBsm-53m-43@gated-at.bofh.it> (permalink) |
| References | <tNjc5-1OZ-7@gated-at.bofh.it> <tNxf4-2qB-17@gated-at.bofh.it> <tNxI6-2Aw-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Anatoly Pugachev <matorola@gmail.com> Date: Thu, 1 Jun 2017 15:46:04 +0300 > on the same topic , latest git does not compile for me with gcc-7.0.1 > gcc version 7.0.1 20170407 (experimental) [trunk revision 246759] > (Debian 7-20170407-1) > > $ make > ... > CC arch/sparc/kernel/ds.o > arch/sparc/kernel/ds.c: In function ‘register_services’: > arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte > into a region of size 0 overflows the destination > [-Werror=stringop-overflow ] > strcpy(pbuf.req.svc_id, cp->service_id); > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ That's easy enough to fix, I've pushed the patch below to 'sparc' GIT. > MODPOST vmlinux.o > ipc/built-in.o: In function `mq_attr_ok.isra.0': > mqueue.c:(.text+0xc490): undefined reference to `__multi3' > drivers/built-in.o: In function `dm_vcalloc': > (.text+0xc9e98): undefined reference to `__multi3' > Makefile:997: recipe for target 'vmlinux' failed > make: *** [vmlinux] Error 1 This, on the other hand.... wonder why it wants to do a 128-bit multiply when the MQ attribute struct is just 64-bit values... ==================== From 0fde7ad71ee371ede73b3f326e58f9e8d102feb6 Mon Sep 17 00:00:00 2001 From: "David S. Miller" <davem@davemloft.net> Date: Thu, 1 Jun 2017 09:42:46 -0700 Subject: [PATCH] sparc64: Fix build warnings with gcc 7. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit arch/sparc/kernel/ds.c: In function ‘register_services’: arch/sparc/kernel/ds.c:912:3: error: ‘strcpy’: writing at least 1 byte into a region of size 0 overflows the destination Reported-by: Anatoly Pugachev <matorola@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> --- arch/sparc/kernel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index b542cc7..f87265a 100644 --- a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c @@ -909,7 +909,7 @@ static int register_services(struct ds_info *dp) pbuf.req.handle = cp->handle; pbuf.req.major = 1; pbuf.req.minor = 0; - strcpy(pbuf.req.svc_id, cp->service_id); + strcpy(pbuf.id_buf, cp->service_id); err = __ds_send(lp, &pbuf, msg_len); if (err > 0) -- 2.1.2.532.g19b5d50
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
sparc gcc 7.1 compile issue Waldemar Brodkorb <wbx@openadk.org> - 2017-05-31 21:40 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-05-31 23:20 +0200
Re: sparc gcc 7.1 compile issue Waldemar Brodkorb <wbx@openadk.org> - 2017-06-01 14:20 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-01 14:50 +0200
Re: sparc gcc 7.1 compile issue Anatoly Pugachev <matorola@gmail.com> - 2017-06-01 14:50 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-01 18:50 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-02 11:20 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-02 16:30 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-02 18:40 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-02 19:30 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-04 15:20 +0200
Re: sparc gcc 7.1 compile issue Waldemar Brodkorb <wbx@openadk.org> - 2017-06-04 16:50 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-04 17:10 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-04 22:30 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-04 22:30 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-04 22:30 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-04 22:40 +0200
Re: sparc gcc 7.1 compile issue John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> - 2017-06-04 22:40 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-04 22:40 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-04 22:40 +0200
Re: sparc gcc 7.1 compile issue David Miller <davem@davemloft.net> - 2017-06-04 22:30 +0200
csiph-web