Bug 24440 - binutils/wrstabs.c:1476:25: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
Summary: binutils/wrstabs.c:1476:25: error: ‘%s’ directive argument is null [-Werror=f...
Status: RESOLVED MOVED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.33
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-10 14:36 UTC by dilyan.palauzov@aegee.org
Modified: 2024-01-01 02:56 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dilyan.palauzov@aegee.org 2019-04-10 14:36:29 UTC
Compiling most recent binutils (git/master - commit b05971a652c35ed72d3c95290e18) with gcc 8.3.1 20190330fails with:

make[4]: Entering directory '/root/binutils/binutils'
gcc -DHAVE_CONFIG_H -I. -I/git/binutils-gdb/binutils  -I. -I/git/binutils-gdb/binutils -I../bfd -I/git/binutils-gdb/binutils/..
/bfd -I/git/binutils-gdb/binutils/../include -DLOCALEDIR="\"/usr/local/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulat
ion  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Werror  -O2 -pipe -g -MT wrstabs.o -MD -M
P -MF .deps/wrstabs.Tpo -c -o wrstabs.o /git/binutils-gdb/binutils/wrstabs.c
/git/binutils-gdb/binutils/wrstabs.c: In function ‘stab_start_class_type’:
/git/binutils-gdb/binutils/wrstabs.c:1476:25: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
    sprintf (vtable, "~%%%s", vstring);
                         ^~
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1061: wrstabs.o] Error 1
Comment 1 Andreas Schwab 2019-04-10 14:50:00 UTC
That doesn't make sense.  vstring must be non-null since it has been passed to strlen already.
Comment 2 dilyan.palauzov@aegee.org 2019-04-10 14:57:23 UTC
Moved to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90036 .