[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back f
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c |
Date: |
Mon, 09 Jul 2012 10:46:48 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 |
On 07/09/2012 10:07 AM, Markus Armbruster wrote:
>>> This is an unconditional use of fd_type[0]. If floppy == NULL, this is
>>> dereferencing an uninitialized value.
>>>
>>> I'm not sure why the explicit initialization was removed...
>
> Brain fart on my part, sorry. The old loop assigns only if the drive
> exists. The new loop assigns unconditionally. Except the whole loop is
> still conditional.
>
> Testing can't flag this, because floppy is never null.
>
>> Looks broken indeed. I just wonder why my gcc (or the buildbots) didn't
>> complain.
>
> Me too. Looks like I should upgrade to a more recent gcc.
It's probably not the version of the gcc you used, but whether or not
your CFLAGS include -O2. Gcc has the (IMO very annoying) limitation
that uninitialized-use analysis can only be performed if you are also
doing optimization. You have to use a tool like clang or Coverity if
you want more reliable uninitialized-use analysis even while building
-O0 debug images.
--
Eric Blake address@hidden +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 13/25] blkdebug: store list of active rules, (continued)
- [Qemu-devel] [PATCH 13/25] blkdebug: store list of active rules, Kevin Wolf, 2012/07/09
- [Qemu-devel] [PATCH 15/25] raw: hook into blkdebug, Kevin Wolf, 2012/07/09
- [Qemu-devel] [PATCH 24/25] qtest: Tidy up temporary files properly, Kevin Wolf, 2012/07/09
- [Qemu-devel] [PATCH 21/25] fdc_test: introduce test_sense_interrupt, Kevin Wolf, 2012/07/09
- [Qemu-devel] [PATCH 19/25] fdc: fix interrupt handling, Kevin Wolf, 2012/07/09
- [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Kevin Wolf, 2012/07/09
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Anthony Liguori, 2012/07/09
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Kevin Wolf, 2012/07/09
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Anthony Liguori, 2012/07/09
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Markus Armbruster, 2012/07/09
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c,
Eric Blake <=
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Anthony Liguori, 2012/07/09
- Re: [Qemu-devel] [PATCH 23/25] fdc: Move floppy geometry guessing back from block.c, Kevin Wolf, 2012/07/10
[Qemu-devel] [PATCH 22/25] fdc: Drop broken code for user-defined floppy geometry, Kevin Wolf, 2012/07/09
[Qemu-devel] [PATCH 25/25] block: Factor bdrv_read_unthrottled() out of guess_disk_lchs(), Kevin Wolf, 2012/07/09
Re: [Qemu-devel] [PULL 00/25] Block patches, Anthony Liguori, 2012/07/09