On 25 August 2015 at 15:17, Markus Armbruster <arm...@redhat.com> wrote:
> Stumbled over this while throwing away old mail.  Andreas, what do you
> think?

Seems right to me -- I suspect the original properties code was
written with the assumption that the property field would be
inside the device struct (and so offsets are small). The array
properties code breaks that assumption by allocating a separate
lump of memory with the properties in it; so now there's no
guarantee that the two pointers being subtracted will be
within 4G of each other.

Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>

Arguably for consistency the 'arrayoffset' struct member should
also be a ptrdiff_t, though our current uses of it are such
that it'll always be within int range.

-- PMM

Reply via email to