On 17.04.19 18:58, Eric Blake wrote: > On 4/10/19 2:28 PM, Max Reitz wrote: >> On 01.04.19 16:57, Eric Blake wrote: >>> Disk sizes close to INT64_MAX cause overflow, for some pretty >>> ridiculous output: >>> >>> $ ./nbdkit -U - memory size=$((2**63 - 512)) --run 'qemu-img info $nbd' >>> image: nbd+unix://?socket=/tmp/nbdkitHSAzNz/socket >>> file format: raw >>> virtual size: -8388607T (9223372036854775296 bytes) >>> disk size: unavailable >>> > >> >> There are more iotests this breaks. First, there is 059 for vmdk, which >> looks just like the rest. > > Easy enough; I was able to reproduce. > >> >> But for -m32, it gets a bit more difficult. Every size above 999 GB >> (1000 GB gets rounded to 1 TB, which is 2^31 * 512) gets printed as >> "inf [unit]": > > Ouch - pre-existing bug in size_to_str(); I'll have to fix that, then > send a v3. > > Kevin, do you want to unqueue this from block-next until then? > >> >> But regardless of the iotests, we shouldn’t show the size as infinite >> just because of -m32. > > Is there an easy docker setup for building -m32?
I don’t know. In theory it's as simple as (on Fedora): $ export PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig $ ../configure --target-list=x86_64-softmmu --extra-cflags=-m32 $ make In practice, Fedora 29 has a broken glib2-devel.i686 package, which you cannot install alongside the x86_64 version, so it doesn’t work (https://bugzilla.redhat.com/show_bug.cgi?id=1651231). I had hoped it was fixed by now... :-/ (In case you’re wondering, I’m building the 32-bit version on Arch.) Max
signature.asc
Description: OpenPGP digital signature