public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/18432] New: make check fails for Werror=memset-transposed-args with gcc 4.9.2
@ 2015-05-19 18:44 simon at keinstein dot org
  2015-09-01 14:48 ` [Bug build/18432] " andrew.bennett at imgtec dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: simon at keinstein dot org @ 2015-05-19 18:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18432

            Bug ID: 18432
           Summary: make check fails for Werror=memset-transposed-args
                    with gcc 4.9.2
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: simon at keinstein dot org
                CC: carlos at redhat dot com
  Target Milestone: ---

glibc version: 85bae5a160e288fa85eab8a5d1b0b227ab20798a (Tue May 19 11:23:56
2015 -0700)
config: --enable-maintainer-mode --prefix=/home/simon/local/glibc
gcc --version: gcc (Debian 4.9.2-10) 4.9.2
on Debian 8 amd64

make check fails in the string subdir:
./make check
[...]
make[2]: Entering directory '/home/simon/glibc.master/string'
gcc tester.c -c -std=gnu99 -fgnu89-inline  -O2 -Wall -Werror -Wno-error=undef
-Wundef -Wwrite-strings -fmerge-all-constants -frounding-math -g
-Wstrict-prototypes          -I../include
-I/home/simon/build/glibc.master/string  -I/home/simon/build/glibc.master 
-I../sysdeps/unix/sysv/linux/x86_64/64  -I../sysdeps/unix/sysv/linux/x86_64 
-I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/unix/sysv/linux/wordsize-64 
-I../sysdeps/x86_64/nptl  -I../sysdeps/unix/sysv/linux/include
-I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread 
-I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv 
-I../sysdeps/unix/x86_64  -I../sysdeps/unix  -I../sysdeps/posix 
-I../sysdeps/x86_64/64  -I../sysdeps/x86_64/fpu/multiarch 
-I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu 
-I../sysdeps/x86_64/multiarch  -I../sysdeps/x86_64  -I../sysdeps/x86 
-I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64/wordsize-64 
-I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32 
-I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I..
-I../libio -I.   -D_LIBC_REENTRANT -include
/home/simon/build/glibc.master/libc-modules.h -DMODULE_NAME=nonlib -include
../include/libc-symbols.h       -o
/home/simon/build/glibc.master/string/tester.o -MD -MP -MF
/home/simon/build/glibc.master/string/tester.o.dt -MT
/home/simon/build/glibc.master/string/tester.o
tester.c: In function ‘test_memset’:
tester.c:1313:10: error: ‘memset’ used with constant zero length parameter;
this could be due to transposed parameters [-Werror=memset-transposed-args]
   (void) memset(one+2, 'y', 0);
          ^
cc1: all warnings being treated as errors
../o-iterator.mk:9: recipe for target
'/home/simon/build/glibc.master/string/tester.o' failed
make[2]: *** [/home/simon/build/glibc.master/string/tester.o] Error 1
make[2]: Leaving directory '/home/simon/glibc.master/string'
Makefile:213: recipe for target 'string/tests' failed
make[1]: *** [string/tests] Error 2
make[1]: Leaving directory '/home/simon/glibc.master'
Makefile:9: recipe for target 'check' failed
make: *** [check] Error 2

Regards, Simon

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-28300-listarch-glibc-bugs=sources.redhat.com@sourceware.org Tue May 19 19:05:34 2015
Return-Path: <glibc-bugs-return-28300-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 64090 invoked by alias); 19 May 2015 19:05:34 -0000
Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <glibc-bugs.sourceware.org>
List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org>
List-Post: <mailto:glibc-bugs@sourceware.org>
List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: glibc-bugs-owner@sourceware.org
Delivered-To: mailing list glibc-bugs@sourceware.org
Received: (qmail 64044 invoked by uid 48); 19 May 2015 19:05:30 -0000
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/18421] read-only segment has dynamic relocations
Date: Tue, 19 May 2015 19:05:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: libc
X-Bugzilla-Version: 2.21
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: carlos at redhat dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: carlos at redhat dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags: security-
X-Bugzilla-Changed-Fields: cc assigned_to
Message-ID: <bug-18421-131-7JYuRCuOoV@http.sourceware.org/bugzilla/>
In-Reply-To: <bug-18421-131@http.sourceware.org/bugzilla/>
References: <bug-18421-131@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-05/txt/msg00165.txt.bz2
Content-length: 474

https://sourceware.org/bugzilla/show_bug.cgi?id\x18421

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com
           Assignee|unassigned at sourceware dot org   |carlos at redhat dot com

--
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug build/18432] make check fails for Werror=memset-transposed-args with gcc 4.9.2
  2015-05-19 18:44 [Bug build/18432] New: make check fails for Werror=memset-transposed-args with gcc 4.9.2 simon at keinstein dot org
@ 2015-09-01 14:48 ` andrew.bennett at imgtec dot com
  2015-09-01 19:52 ` carlos at redhat dot com
  2021-03-08 13:21 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: andrew.bennett at imgtec dot com @ 2015-09-01 14:48 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18432

Andrew Bennett <andrew.bennett at imgtec dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew.bennett at imgtec dot com

--- Comment #1 from Andrew Bennett <andrew.bennett at imgtec dot com> ---
Hi Simon,

I have also just found this issue on my Debian system.  After a little bit of
digging I have found that the Debian GCC 4.9 compiler
(https://packages.debian.org/jessie/gcc-4.9) has back-ported the
-Wmemset-transposed-args patch
(https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212510); look for
memset-transposed in
(http://http.debian.net/debian/pool/main/g/gcc-4.9/gcc-4.9_4.9.2-10.diff.gz). 
This feature was only introduced in GCC 5.0 (the gcc-5_1_0-release tag to be
specific), which means the check in string/tester.c is correct:

#if __GNUC_PREREQ (5, 0)
  /* GCC 5.0 warns about a zero-length memset because the arguments to memset
     may be in the wrong order.  But we really want to test this.  */
  DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args")
#endif

One quick fix is to change __GNUC_PREREQ (5, 0) to __GNUC_PREREQ (4, 9) when
testing glibc and the test should pass.

Regards,


Andrew

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug build/18432] make check fails for Werror=memset-transposed-args with gcc 4.9.2
  2015-05-19 18:44 [Bug build/18432] New: make check fails for Werror=memset-transposed-args with gcc 4.9.2 simon at keinstein dot org
  2015-09-01 14:48 ` [Bug build/18432] " andrew.bennett at imgtec dot com
@ 2015-09-01 19:52 ` carlos at redhat dot com
  2021-03-08 13:21 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: carlos at redhat dot com @ 2015-09-01 19:52 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18432

--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to joseph@codesourcery.com from comment #2)
> Changing the conditional would break building this test for upstream GCC 
> 4.9 which does not have that option (specifying an unknown option here 
> causes an error).  A patch doing so had to be reverted for that reason 
> (commit 500bfbd4922902ea278adab06e58b77eb355ba82).

The real fix being to test for the particular compiler feature at configure
time and then adjust the test according to the detected compiler feature. We
almost always want to convert version tests to feature tests in scenarios like
this, but it's work that hasn't been done yet.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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

* [Bug build/18432] make check fails for Werror=memset-transposed-args with gcc 4.9.2
  2015-05-19 18:44 [Bug build/18432] New: make check fails for Werror=memset-transposed-args with gcc 4.9.2 simon at keinstein dot org
  2015-09-01 14:48 ` [Bug build/18432] " andrew.bennett at imgtec dot com
  2015-09-01 19:52 ` carlos at redhat dot com
@ 2021-03-08 13:21 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2021-03-08 13:21 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=18432

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com
             Status|NEW                         |RESOLVED
         Resolution|---                         |WORKSFORME

--- Comment #4 from Florian Weimer <fweimer at redhat dot com> ---
GCC 4.9 is no longer supported for building glibc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2021-03-08 13:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 18:44 [Bug build/18432] New: make check fails for Werror=memset-transposed-args with gcc 4.9.2 simon at keinstein dot org
2015-09-01 14:48 ` [Bug build/18432] " andrew.bennett at imgtec dot com
2015-09-01 19:52 ` carlos at redhat dot com
2021-03-08 13:21 ` fweimer at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).