Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2017 14:22:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 217000] devel/elfutils: fails to build with lang/gcc6 or later
Message-ID:  <bug-217000-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D217000

            Bug ID: 217000
           Summary: devel/elfutils: fails to build with lang/gcc6 or later
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: needs-patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: freebsd-ports-bugs@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: cem@freebsd.org, gerald@FreeBSD.org
                CC: cem@freebsd.org, gerald@FreeBSD.org

readelf.c: In function 'process_elf_file':
readelf.c:1448:47: error: potential null pointer dereference
[-Werror=3Dnull-dereference]
   Elf_Scn *symscn =3D elf_getscn (ebl->elf, shdr->sh_link);
                                           ~~~~^~~~~~~~~
readelf.c: In function 'handle_hash':
readelf.c:3338:12: error: potential null pointer dereference
[-Werror=3Dnull-dereference]
    if (shdr->sh_type =3D=3D SHT_HASH)
        ~~~~^~~~~~~~~
readelf.c: In function 'handle_hash':
readelf.c:3346:17: error: potential null pointer dereference
[-Werror=3Dnull-dereference]
    else if (shdr->sh_type =3D=3D SHT_GNU_HASH)
             ~~~~^~~~~~~~~
readelf.c: In function 'print_debug_exception_table':
readelf.c:7966:7: error: 'landing_pad' may be used uninitialized in this
function [-Werror=3Dmaybe-uninitialized]
       printf (gettext (" [%4u] Call site start:   %#" PRIx64 "\n"
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          "        Call site length:  %" PRIu64 "\n"
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          "        Landing pad:       %#" PRIx64 "\n"
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          "        Action:            %u\n"),
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        u++, call_site_start, call_site_length, landing_pad, action);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
readelf.c:7966:7: error: 'call_site_length' may be used uninitialized in th=
is
function [-Werror=3Dmaybe-uninitialized]
readelf.c:7966:7: error: 'call_site_start' may be used uninitialized in this
function [-Werror=3Dmaybe-uninitialized]
unstrip.c: In function 'copy_elided_sections':
unstrip.c:1427:19: error: potential null pointer dereference
[-Werror=3Dnull-dereference]
       sec->outscn =3D scn;
       ~~~~~~~~~~~~^~~~~

gcc6 build log: http://sprunge.us/GHgD

asm_newsym.c: In function 'asm_newsym':
asm_newsym.c:67:41: error: '%07u' directive output may be truncated writing
between 7 and 10 bytes into a region of size 8 [-Werror=3Dformat-truncation=
=3D]
       snprintf (tempsym, TEMPSYMLEN, ".L%07u", asmscn->ctx->tempsym_count+=
+);
                                         ^~~~
asm_newsym.c:67:38: note: using the range [1, 4294967295] for directive
argument
       snprintf (tempsym, TEMPSYMLEN, ".L%07u", asmscn->ctx->tempsym_count+=
+);
                                      ^~~~~~~~
asm_newsym.c:67:7: note: format output between 10 and 13 bytes into a
destination of size 10
       snprintf (tempsym, TEMPSYMLEN, ".L%07u", asmscn->ctx->tempsym_count+=
+);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~
ar.c: In function 'do_oper_insert':
ar.c:1460:42: error: '%-*ld' directive output may be truncated writing betw=
een
16 and 20 bytes into a region of size 17 [-Werror=3Dformat-truncation=3D]
     snprintf (tmpbuf, sizeof (tmpbuf), "/%-*ld",
                                          ^~~~~
ar.c:1460:40: note: using the range [1, -9223372036854775808] for directive
argument
     snprintf (tmpbuf, sizeof (tmpbuf), "/%-*ld",
                                        ^~~~~~~~
ar.c:1460:5: note: format output between 18 and 22 bytes into a destination=
 of
size 18
     snprintf (tmpbuf, sizeof (tmpbuf), "/%-*ld",
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        (int) sizeof (arhdr.ar_name), all->long_name_off);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing betw=
een
12 and 20 bytes into a region of size 13 [-Werror=3Dformat-truncation=3D]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                        ^~~~~
ar.c:1076:55: note: using the range [1, -9223372036854775808] for directive
argument
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                       ^~~~~~~
ar.c:1076:3: note: format output between 13 and 21 bytes into a destination=
 of
size 13
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing betw=
een
6 and 10 bytes into aregion of size 7 [-Werror=3Dformat-truncation=3D]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                        ^~~~~
ar.c:1076:55: note: directive argument in the range [0, 4294967295]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                       ^~~~~~~
ar.c:1076:3: note: format output between 7 and 11 bytes into a destination =
of
size 7
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing betw=
een
6 and 10 bytes into aregion of size 7 [-Werror=3Dformat-truncation=3D]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                        ^~~~~
ar.c:1076:55: note: directive argument in the range [0, 4294967295]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                       ^~~~~~~
ar.c:1076:3: note: format output between 7 and 11 bytes into a destination =
of
size 7
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing betw=
een
10 and 20 bytes into a region of size 11 [-Werror=3Dformat-truncation=3D]
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                        ^~~~~
ar.c:1076:55: note: using the range [1, -9223372036854775808] for directive
argument
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
                                                       ^~~~~~~
ar.c:1076:3: note: format output between 11 and 21 bytes into a destination=
 of
size 11
   snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, va=
l);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=
~~

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-217000-13>