Your message dated Tue, 20 Sep 2016 22:15:11 +0000
with message-id <>
and subject line Bug#838316: Removed package(s) from unstable
has caused the Debian Bug report #751812,
regarding Incorrect fortify warning with -flto
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact

Debian Bug Tracking System
Contact with problems
--- Begin Message ---
Package: gcc-4.9
Version: 4.9.0-6

$ cat t.c
#include <stdio.h>
#include <limits.h>

long long size;

void execute(void) {
  unsigned char input[4096];
  size_t bytes = (size > (ssize_t)sizeof input
                  ? sizeof input
                  : size);
  size_t bytesRead = fread(input, 1, bytes, stdin);

int main(int argc, char **argv) {
  size = LLONG_MAX;
  return 0;
$ gcc-4.9 -O2 t.c
$ gcc-4.9 -O2 -flto t.c
In function ‘__fread_alias’,
    inlined from ‘execute’ at t.c:12:10:
/usr/include/i386-linux-gnu/bits/stdio2.h:290:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
  return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);

richard@deodand:~/src/vbig$ dpkg -l libc6-dev gcc-4.9
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
ii  gcc-4.9        4.9.0-6      i386         GNU C compiler
ii libc6-dev:i386 2.19-1 i386 Embedded GNU C Library: Developme

The relevant portion of stdio2.h is:

   266  extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
   267                             size_t __size, size_t __n,
   268                             FILE *__restrict __stream) __wur;
   269  extern size_t __REDIRECT (__fread_alias,
   270                            (void *__restrict __ptr, size_t __size,
   271                             size_t __n, FILE *__restrict __stream),
   272                            fread) __wur;
   273  extern size_t __REDIRECT (__fread_chk_warn,
   274                            (void *__restrict __ptr, size_t __ptrlen,
   275                             size_t __size, size_t __n,
   276                             FILE *__restrict __stream),
   277                            __fread_chk)
278 __wur __warnattr ("fread called with bigger size * nmemb than length "
   279                         "of destination buffer");
   281  __fortify_function __wur size_t
   282  fread (void *__restrict __ptr, size_t __size, size_t __n,
   283         FILE *__restrict __stream)
   284  {
   285    if (__bos0 (__ptr) != (size_t) -1)
   286      {
   287        if (!__builtin_constant_p (__size)
   288            || !__builtin_constant_p (__n)
289 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2))) 290 return __fread_chk (__ptr, __bos0 (__ptr), __size, __n, __stream);
   292        if (__size * __n > __bos0 (__ptr))
293 return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
   294      }
   295    return __fread_alias (__ptr, __size, __n, __stream);
   296  }

The warning attribute is attached to __fread_chk_warn (called line 293) but the warning is issued against line 290 where __fread_chk is called - so the compiler has got confused about these two functions?


--- End Message ---
--- Begin Message ---
Version: 4.9.4-2+rm

Dear submitter,

as the package gcc-4.9 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see

The version of this package that was in Debian prior to this removal
can still be found using

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing

Debian distribution maintenance software
Chris Lamb (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to