Re: strcpy returns NULL pointer and not destination pointer

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

 



Chen, Kenneth W wrote:	[Wed May 03 2006, 02:08:47PM EDT]
> Bob Picco wrote on Wednesday, May 03, 2006 6:38 AM
> > The removal of -ffreestanding compiler flag in 2.6.17-rcX (commit id
> > 6edfba1b33c701108717f4e036320fc39abe1912) causes strcpy calls 
> > with a known size for the source string to be replaced with memcpy which
> > is faster.  ia64 memcpy has return values which are unlike stdlibc and
> > the other arch memcpy routines examined by me in the kernel.  The ia64 return
> > values are 0 for success and number of bytes copied for failure. Thus any
> > instance of pointer = strcpy(dest, "some string") has zero assigned to
> > pointer.  I detected this when testing kgdb on 2.6.17-rc3.  
> > 
> > The implementation in memcpy_mck.S doesn't leave a single scratch
> > register or predicate. I didn't pursue very long for a solution.
> 
> I thought I fixed that about 3 years ago:
> 
> http://marc.theaimsgroup.com/?l=linux-ia64&m=105590709805435&w=2
> 
> Did it fall through the crack?  I'm not sure what's going on.
> 
> - Ken
It looks to have definitely fallen through a crack or two.

I applied to rc3 and boot tested for you. I assume you'll post patch again.

bob
-
: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Sparc Linux]     [DCCP]     [Linux ARM]     [Yosemite News]     [Linux SCSI]     [Linux x86_64]     [Linux for Ham Radio]

  Powered by Linux