Bug#674917: libc6-dev: mblen is erroneously marked warn_unused_result

2012-05-29 Thread Jonathan Nieder
tags 674917 + upstream patch
quit

Hi,

Antti-Juhani Kaijanaho wrote:

 However, so far as I can see, ignoring the return value of mblen is never a
 security problem and is sometimes appropriate (the first call to the function
 is often mblen(NULL, 0), the result value of which is usually of no interest).

This doesn't seem to be fixed upstream, so please report it to
http://sourceware.org/bugzilla, product glibc, component libc and
let us know the bug number so we can track it.

 (Debian's use of -D_FORTIFY_SOURCE=2 and the common policy of using -Werror
 together make this a noncosmetic issue.)

Using -Werror in contexts other than private development where you
control the toolchain and can easily suppress known warnings is not
very wise.

Thanks and hope that helps,
Jonathan

* stdlib/stdlib.h (mblen): Remove __wur.
It is not necessarily an error to ignore the return value from
mblen(NULL, 0) which resets the shift state.

diff --git i/stdlib/stdlib.h w/stdlib/stdlib.h
index f652eda3..f14ec0e3 100644
--- i/stdlib/stdlib.h
+++ w/stdlib/stdlib.h
@@ -859,7 +859,7 @@ extern int qfcvt_r (long double __value, int __ndigit,
 __BEGIN_NAMESPACE_STD
 /* Return the length of the multibyte character
in S, which is no longer than N.  */
-extern int mblen (const char *__s, size_t __n) __THROW __wur;
+extern int mblen (const char *__s, size_t __n) __THROW;
 /* Return the length of the given multibyte character,
putting its `wchar_t' representation in *PWC.  */
 extern int mbtowc (wchar_t *__restrict __pwc,



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120529163603.GB17455@burratino



Bug#674917: libc6-dev: mblen is erroneously marked warn_unused_result

2012-05-29 Thread Antti-Juhani Kaijanaho
On Tue, May 29, 2012 at 11:36:03AM -0500, Jonathan Nieder wrote:
 This doesn't seem to be fixed upstream, so please report it to
 http://sourceware.org/bugzilla, product glibc, component libc and
 let us know the bug number so we can track it.

It is commonly accepted Debian practice for the maintainer to forward bugs
upstream.  I think this goes double for upstreams that require reporter
accounts in their bug tracking systems or otherwise make reporting a matter of
jumping through unnecessary hoops.

However, I've done what you asked.
http://sourceware.org/bugzilla/show_bug.cgi?id=14176

-- 
Antti-Juhani Kaijanaho, Jyväskylä, Finland
http://antti-juhani.kaijanaho.fi/newblog/
http://www.flickr.com/photos/antti-juhani/




--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120529193453.gd2...@kukkavihko.kaijanaho.fi



Bug#674917: libc6-dev: mblen is erroneously marked warn_unused_result

2012-05-29 Thread Jonathan Nieder
forwarded 674917 http://sourceware.org/PR14176
quit

Antti-Juhani Kaijanaho wrote:

 However, I've done what you asked.
 http://sourceware.org/bugzilla/show_bug.cgi?id=14176

Thanks much.

Kind regards,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120529193638.GA21450@burratino



Bug#674917: libc6-dev: mblen is erroneously marked warn_unused_result

2012-05-28 Thread Antti-Juhani Kaijanaho
Package: libc6-dev
Version: 2.13-32
Severity: normal

GCC documentation states:

  The warn_unused_result attribute causes a warning to be emitted if a caller
  of the function with this attribute does not use its return value. This is
  useful for functions where not checking the result is either a security
  problem or always a bug, such as realloc.

However, so far as I can see, ignoring the return value of mblen is never a
security problem and is sometimes appropriate (the first call to the function
is often mblen(NULL, 0), the result value of which is usually of no interest).

(Debian's use of -D_FORTIFY_SOURCE=2 and the common policy of using -Werror
together make this a noncosmetic issue.)

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.4.0-ibid-1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libc6-dev depends on:
ii  libc-dev-bin2.13-32
ii  libc6   2.13-32
ii  linux-libc-dev  3.2.18-1

Versions of packages libc6-dev recommends:
ii  gcc [c-compiler]  4:4.7.0-6
ii  gcc-4.4 [c-compiler]  4.4.7-1
ii  gcc-4.5 [c-compiler]  4.5.3-12
ii  gcc-4.6 [c-compiler]  4.6.3-5
ii  gcc-4.7 [c-compiler]  4.7.0-9

Versions of packages libc6-dev suggests:
ii  glibc-doc none
ii  manpages-dev  3.40-0.1

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20120528155516.20614.80987.report...@kukkaseppele.kaijanaho.fi