|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] vsprintf: Make sure argument to %*ph/%pv is valid
On 02/10/2015 04:49 PM, Andrew Cooper wrote: On 10/02/2015 21:44, Boris Ostrovsky wrote:If NULL pointer is passed for these specifiers then print '-' or 'd-v-'. Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>Instead of special casing each custom format, I would be tempted just to put the switch() in an if(arg) conditional, and fall back to the regular number for a NULL pointer, or go along the glibc route and print "(NULL)". OK, I could do that. I presume you found this by falling over a NULL pointer while debugging? I can't see a legitimate reason for formally supporting NULL pointers in each context, but crashing is certainly better avoided. Yes, I hit %pv case when the vcpu I was tracking turned NULL. And yes, we then crash. -boris ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |