From: Sergei Steshenko <sergstesh@yahoo.com>
To: qemu-devel@nongnu.org, Andrzej Zaborowski <balrogg@gmail.com>
Subject: Re: [Qemu-devel] index out of bounds in qemu-0.10.2
Date: Sat, 18 Apr 2009 12:37:43 -0700 (PDT) [thread overview]
Message-ID: <274135.25165.qm@web35205.mail.mud.yahoo.com> (raw)
--- On Sat, 4/18/09, Blue Swirl <blauwirbel@gmail.com> wrote:
> From: Blue Swirl <blauwirbel@gmail.com>
> Subject: Re: [Qemu-devel] index out of bounds in qemu-0.10.2
> To: qemu-devel@nongnu.org, "Andrzej Zaborowski" <balrogg@gmail.com>
> Date: Saturday, April 18, 2009, 11:25 AM
> On 4/17/09, Sergei Steshenko <sergstesh@yahoo.com>
> wrote:
> > Hello,
> >
> > I am compiling qemu-0.10.2 using the attached
> autogenerated 'configure'
> > wrapper (if anybody is interested in 'configure'
> command line options I'm
> > using_.
> >
> > I am using self-built gcc-4.3.3, my OS is SUSE
> 10.3, 32 bits.
> >
> > While running 'make' I've noticed this:
> >
> > 41
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/twl92230.c:
> In function ‘menelaus_load’:
> > 42
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/hw.h:114:
> warning: array subscript is above array bounds
> > 43
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/hw.h:114:
> warning: array subscript is above array bounds
> > 44
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/hw.h:114:
> warning: array subscript is above array bounds
> > 45
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/twl92230.c:
> In function ‘menelaus_save’:
> > 46
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/hw.h:94:
> warning: array subscript is above array bounds
> > 47
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/hw.h:94:
> warning: array subscript is above array bounds
> > 48
> /mnt/sdb8/sergei/AFSWD_debug/build/qemu-0.10.2/hw/hw.h:94:
> warning: array subscript is above array bounds
> > .
> >
> > Once I had the same warnings compiling my own
> code, and 'gcc' was correct,
> > so most likely it's correct in this case too.
> >
> > If so, please fix this.
>
> My gcc and even sparse is completely silent, strange.
>
> It's because of this area:
>
> uint8_t dcdc[3];
>
> is saved like this:
>
> qemu_put_8s(f, &s->dcdc[3]);
> qemu_put_8s(f, &s->dcdc[3]);
> qemu_put_8s(f, &s->dcdc[3]);
>
> and loaded like this:
>
> qemu_get_8s(f, &s->dcdc[3]);
> qemu_get_8s(f, &s->dcdc[3]);
> qemu_get_8s(f, &s->dcdc[3]);
>
> which is of course wrong.
>
>
>
What is your 'gcc' version ?
I think 'gcc' strictness began from gcc-4.2.0, and the developers have been
adding strictness features since.
Thanks,
Sergei.
next reply other threads:[~2009-04-18 19:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-18 19:37 Sergei Steshenko [this message]
-- strict thread matches above, loose matches on Subject: below --
2009-04-16 22:49 [Qemu-devel] index out of bounds in qemu-0.10.2 Sergei Steshenko
2009-04-18 18:25 ` Blue Swirl
2009-04-19 0:23 ` andrzej zaborowski
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=274135.25165.qm@web35205.mail.mud.yahoo.com \
--to=sergstesh@yahoo.com \
--cc=balrogg@gmail.com \
--cc=qemu-devel@nongnu.org \
/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 NNTP newsgroup(s).