Re: [PATCH 4/4] kernel,debug: SPARC KGDB stub strcpy fix

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

 



From: Konrad Eisele <konrad@xxxxxxxxxxx>
Date: Tue, 11 Oct 2011 14:16:01 +0200

> It is a gcc optimization. strcpy(p,"string") is converted to memcpy(p,7).
> I could think of 2 ways:
> - fix memcpy() so that it returns the dest-pointer instead of 0. (However
>   there might be a reason that it returns 0 ...
> - keep the "kernel,debug: SPARC KGDB stub strcpy fix" patch but change the
>   summary of the patch to:
>     Works aroung the fact that strcpy with a constant string is
>     converted to memcpy by gcc and that  memcpy in SPARC returns 0.
> 
> I'll send the 2 possibilities as a reply in a moment.

I think memcpy() should be fixed to return the dest pointer.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux