From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Nick Clifton <nickc@redhat.com>
Cc: Binutils <binutils@sourceware.org>
Subject: [buildrobot] readelf.c (decode_arm_unwind): Initialise addr structure
Date: Mon, 14 Oct 2013 11:19:00 -0000 [thread overview]
Message-ID: <20131014111943.GB27569@lug-owl.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 2832 bytes --]
Hi Nick!
Buildrobot found this:
libtool: link: gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -o addr2line addr2line.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a -lz
gcc -DHAVE_CONFIG_H -I. -I/home/jbglaw/repos/binutils/binutils -I. -I/home/jbglaw/repos/binutils/binutils -I../bfd -I/home/jbglaw/repos/binutils/binutils/../bfd -I/home/jbglaw/repos/binutils/binutils/../include -DLOCALEDIR="\"/home/jbglaw/build/mipsel-linux/_install_/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -g -O2 -MT readelf.o -MD -MP -MF .deps/readelf.Tpo -c -o readelf.o /home/jbglaw/repos/binutils/binutils/readelf.c
cc1: warnings being treated as errors
/home/jbglaw/repos/binutils/binutils/readelf.c: In function ‘decode_arm_unwind’:
/home/jbglaw/repos/binutils/binutils/readelf.c:7173: error: missing initializer
/home/jbglaw/repos/binutils/binutils/readelf.c:7173: error: (near initialization for ‘addr.offset’)
make[3]: *** [readelf.o] Error 1
5803 struct absaddr
5804 {
5805 unsigned short section;
5806 bfd_vma offset;
5807 };
[...]
7173 struct absaddr addr = { 0 };
I don't really see why GCC complains about it (and not init's `offset' with 0,
although you probably wanted to init offset instead of section.) And
it's only GCCs on some of the builders, not on all. See
http://toolchain.lug-owl.de/buildbot/timeline.php :
gcc110: no complains:gcc (GCC) 4.7.2 20121109 (Red Hat 4.7.2-8)
pluto: no complains:gcc (Debian 4.8.1-7) 4.8.1
gccbuild:no complains:gcc (Debian 4.8.1-7) 4.8.1
darkeye: no complains:gcc (Debian 4.8.1-7) 4.8.1
gcc15: complains: gcc (Debian 4.4.5-8) 4.4.5
gcc76: complains: gcc (Debian 4.4.5-8) 4.4.5
Looks like a compiler bug to me, uncovered by the recent partial
initialization of `addr'. Is it actually needed? `addr' is fully
initialized in get_unwind_section_word(). So I guess removing the
(incomplete) initializer isn't wrong and would remove the build
failure?
Untested:
2013-10-14 Jan-Benedict Glaw <jbglaw@lug-owl.de>
binutils/
* readelf.c (decode_arm_unwind): Don't initialize `addr'.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 32e0cf0..2156b78 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -7170,7 +7170,7 @@ decode_arm_unwind (struct arm_unw_aux_info * aux,
{
int per_index;
unsigned int more_words = 0;
- struct absaddr addr = { 0 };
+ struct absaddr addr;
bfd_vma sym_name = (bfd_vma) -1;
if (remaining == 0)
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de +49-172-7608481
Signature of: Friends are relatives you make for yourself.
the second :
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2013-10-14 11:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 11:19 Jan-Benedict Glaw [this message]
2013-10-14 11:30 ` nick clifton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131014111943.GB27569@lug-owl.de \
--to=jbglaw@lug-owl.de \
--cc=binutils@sourceware.org \
--cc=nickc@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).