[Bug 217000] devel/elfutils: fails to build with lang/gcc6 or later
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sat Feb 11 14:22:49 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=217000
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 at FreeBSD.org
Reporter: jbeich at FreeBSD.org
CC: cem at freebsd.org, gerald at FreeBSD.org
CC: cem at freebsd.org, gerald at FreeBSD.org
readelf.c: In function 'process_elf_file':
readelf.c:1448:47: error: potential null pointer dereference
[-Werror=null-dereference]
Elf_Scn *symscn = elf_getscn (ebl->elf, shdr->sh_link);
~~~~^~~~~~~~~
readelf.c: In function 'handle_hash':
readelf.c:3338:12: error: potential null pointer dereference
[-Werror=null-dereference]
if (shdr->sh_type == SHT_HASH)
~~~~^~~~~~~~~
readelf.c: In function 'handle_hash':
readelf.c:3346:17: error: potential null pointer dereference
[-Werror=null-dereference]
else if (shdr->sh_type == 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=maybe-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 this
function [-Werror=maybe-uninitialized]
readelf.c:7966:7: error: 'call_site_start' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
unstrip.c: In function 'copy_elided_sections':
unstrip.c:1427:19: error: potential null pointer dereference
[-Werror=null-dereference]
sec->outscn = 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=format-truncation=]
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 between
16 and 20 bytes into a region of size 17 [-Werror=format-truncation=]
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 between
12 and 20 bytes into a region of size 13 [-Werror=format-truncation=]
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~
ar.c:1076:55: note: using the range [1, -9223372036854775808] for directive
argument
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~~~
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, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing between
6 and 10 bytes into aregion of size 7 [-Werror=format-truncation=]
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~
ar.c:1076:55: note: directive argument in the range [0, 4294967295]
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~~~
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, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing between
6 and 10 bytes into aregion of size 7 [-Werror=format-truncation=]
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~
ar.c:1076:55: note: directive argument in the range [0, 4294967295]
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~~~
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, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar.c:1076:56: error: '%-*ld' directive output may be truncated writing between
10 and 20 bytes into a region of size 11 [-Werror=format-truncation=]
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~
ar.c:1076:55: note: using the range [1, -9223372036854775808] for directive
argument
snprintf (tmpbuf, sizeof (tmpbuf), ofmt ? "%-*lo" : "%-*ld", bufsize, val);
^~~~~~~
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, val);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list