public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/18755] New: build errors with -DNDEBUG
@ 2015-08-01 17:36 msebor at redhat dot com
  0 siblings, 0 replies; only message in thread
From: msebor at redhat dot com @ 2015-08-01 17:36 UTC (permalink / raw)
  To: glibc-bugs

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

            Bug ID: 18755
           Summary: build errors with -DNDEBUG
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: msebor at redhat dot com
                CC: carlos at redhat dot com
  Target Milestone: ---

The top of trunk (commit fddb87425a25aeb6e937496c4952c9bf3d8bb673) fails to
build when the NDEBUG macro is defined due to the following errors:

$ grep "error: " make.log  | grep -v "No such " | sort -u
../iconv/skeleton.c:678:16: error: variable ‘nstatus’ set but not used
[-Werror=unused-but-set-variable]
nscd.c:662:11: error: unused variable ‘ret’ [-Werror=unused-variable]
nscd.c:694:7: error: unused variable ‘ret’ [-Werror=unused-variable]
../sysdeps/nptl/gai_misc.h:108:7: error: variable ‘sigerr’ set but not used
[-Werror=unused-but-set-variable]
../sysdeps/nptl/gai_misc.h:84:7: error: unused variable ‘sigerr’
[-Werror=unused-variable]

A simple patch was posted here:
https://sourceware.org/ml/libc-alpha/2015-07/msg00507.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-28963-listarch-glibc-bugs=sources.redhat.com@sourceware.org Sat Aug 01 18:16:54 2015
Return-Path: <glibc-bugs-return-28963-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 110679 invoked by alias); 1 Aug 2015 18:16:54 -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 110505 invoked by uid 48); 1 Aug 2015 18:16:50 -0000
From: "msebor at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug stdio/18756] New: fmemopen succeeds when size is zero
Date: Sat, 01 Aug 2015 18:16:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: stdio
X-Bugzilla-Version: 2.21
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: msebor at redhat dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone
Message-ID: <bug-18756-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-08/txt/msg00003.txt.bz2
Content-length: 1076

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

            Bug ID: 18756
           Summary: fmemopen succeeds when size is zero
           Product: glibc
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: stdio
          Assignee: unassigned at sourceware dot org
          Reporter: msebor at redhat dot com
  Target Milestone: ---

POSIX specifies the fmemopen() function shall fail with EINVAL when the size
argument specifies a buffer size of zero. When compiled with the top of trunk,
the program below aborts indicating that glibc fails to conform to this
requirement.

#include <assert.h>
#include <errno.h>
#include <stdio.h>

int main (void)
{
    char c = 0;
    FILE *f = fmemopen (&c, 0, "w");
    printf ("%p, errno = %m\n", f);
    assert (f == 0 && errno == EINVAL);
    return 0;
}
0x100002f0040, errno = Success
a.out: /build/tmp/t.c:10: main: Assertion `f == 0 && (*__errno_location ()) =22' failed.

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-01 17:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-01 17:36 [Bug build/18755] New: build errors with -DNDEBUG msebor 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).