def __init__(self, space, shape, length, address=r_uint(0)):
- W_DataInstance.__init__(self, space, shape.size * length, address)
+ # XXX workaround for a bug in libffi on x86_64: make sure that
+ # we always have at least 8 bytes. For W_ArrayInstances that are
+ # used as the result value of a function call, ffi_call() writes
+ # 8 bytes into it even if the function's result type asks for less.
+ memsize = shape.size * length
+ W_DataInstance.__init__(self, space, memsize, address)