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

Re: [Xen-devel] [PATCH URGENT] common/vsprintf: Fix signed->unsigned error, causing glacial performance.



>>> On 12.11.13 at 17:10, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> The original patch for
> 
>   c/s 67a3542c5bc356e6452d8305991617c875f87de4
>   "common/vsprintf: Refactor string() out of vsnprintf()"
> 
> specifically used signed integers, identical to the code copied out of 
> vsprintf.
> 
> When committed, these had changed to unsigned integers, which causes a
> functional change.  This causes glacial boot performance and an excessive
> quantity of spaces printed to the serial console, as we loop to the upper
> bound of a 32bit integer.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Considering that I had changed those on the fly while committing,
I committed this one without waiting for an ack. But ...

> --- a/xen/common/vsprintf.c
> +++ b/xen/common/vsprintf.c
> @@ -239,7 +239,7 @@ static char *number(
>  static char *string(char *str, char *end, const char *s,
>                      int field_width, int precision, int flags)
>  {
> -    unsigned int i, len = strnlen(s, precision);
> +    int i, len = strnlen(s, precision);

... this just looks _so_ wrong (and whenever I'll come across
this again, I'll just be tempted again to adjust it)!

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®.