[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] xen/common: Do not tolerate xmalloc(0, ...)



>>> On 31.03.15 at 17:57, <andrew.cooper3@xxxxxxxxxx> wrote:
> Currently, _xmalloc() supports zero-sized allocations by returning a sentinel
> poisoned pointer.
> 
> I posit that there are no legitimate situation for any code in the 
> hypervisor
> to make a zero sized allocation.

I'm afraid there are, and we ran into them (I vaguely recall with an
earlier version of this patch, which tried to do something similar to
what you suggest now). I don't recall where exactly they were, but
it should have been some array allocation with zero array elements
(perhaps because some particular feature was unsupported).

And I second Tim's reply independent from the above.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.