From: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
To: linux-ia64@vger.kernel.org
Subject: RE: strcpy returns NULL pointer and not destination pointer
Date: Wed, 03 May 2006 18:08:47 +0000 [thread overview]
Message-ID: <4t16i2$tinlt@orsmga001.jf.intel.com> (raw)
In-Reply-To: <20060503133806.GC19859@localhost>
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\x105590709805435&w=2
Did it fall through the crack? I'm not sure what's going on.
- Ken
next prev parent reply other threads:[~2006-05-03 18:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-03 13:38 strcpy returns NULL pointer and not destination pointer Bob Picco
2006-05-03 18:08 ` Chen, Kenneth W [this message]
2006-05-03 18:30 ` Bob Picco
2006-05-03 18:46 ` Chen, Kenneth W
2006-05-03 18:48 ` Matthew Wilcox
2006-05-03 18:53 ` Chen, Kenneth W
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='4t16i2$tinlt@orsmga001.jf.intel.com' \
--to=kenneth.w.chen@intel.com \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox