Discussion:
[ast-developers] [patch] Patch to add |stpcpy()|+|stpncpy()| to libast...
Roland Mainz
2012-07-24 14:13:46 UTC
Permalink
Hi!

----

Attached (as "astksh_stpcpy.diff") is a small patch which adds
|stpcpy()| and |stpncpy()| to libast (if the system doesn't provide
them).

IMO it would be nice to put this _both_ into the ksh93u+ and ksh93v-
trees... risk should be very small (except there is a platform which
doesn't have |strnlen()|).

----

Bye,
Roland

P.S.: ast-open needs a purge of cases where |strcat()| is used
multiple times in sequence, cases of |sprintf(buf, "%s%s", ...)| etc.
etc. and have these abdominations all replaced by |stpcpy()| (because
it's faster&&more efficient, e.g. |strcat(buf, "aaa"); strcat(buf,
"bbb");| can be replaced with |char *s=buf; s=stpcpy(s, "aaa");
s=stpcpy(s, "bbb");| ... this will be faster because |strcat()| always
starts from the beginning of the buffer and then searches for the end
while |stpcpy()| allows an application to always continue immediately
where the old string ended).
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: astksh_stpcpy.diff
Type: text/x-patch
Size: 16492 bytes
Desc: not available
URL: <https://mailman.research.att.com/pipermail/ast-developers/attachments/20120724/b560d8e2/attachment.bin>
Glenn Fowler
2012-07-24 14:54:32 UTC
Permalink
except for some contributed ksh code ast does not use strcat()
from way back ast had strcopy() which is basically stpcpy()
if sizes are know we use strcopy() or memcpy()
otherwise the typical paradigm is to use stk*() or sfstr*()

no patches to ksh93u+ code base
"even the seemingly simplest change can wreak unforseen havoc"
we are only fixing dire ksh93u+ regressions at this point
and we are down to one of those on freebsd

for ksh93v- code base I will change strcopy() to use stpcpy()
and ast will provide stpcpy() if its not there
ast will also provide stpncpy() with an iffe for strnlen()
that will fall back to memchr()
--f46d042f9bf07f40ca04c593f8e6
Content-Type: text/plain; charset=ISO-8859-1
Hi!
----
Attached (as "astksh_stpcpy.diff") is a small patch which adds
|stpcpy()| and |stpncpy()| to libast (if the system doesn't provide
them).
IMO it would be nice to put this _both_ into the ksh93u+ and ksh93v-
trees... risk should be very small (except there is a platform which
doesn't have |strnlen()|).
----
Bye,
Roland
P.S.: ast-open needs a purge of cases where |strcat()| is used
multiple times in sequence, cases of |sprintf(buf, "%s%s", ...)| etc.
etc. and have these abdominations all replaced by |stpcpy()| (because
it's faster&&more efficient, e.g. |strcat(buf, "aaa"); strcat(buf,
"bbb");| can be replaced with |char *s=buf; s=stpcpy(s, "aaa");
s=stpcpy(s, "bbb");| ... this will be faster because |strcat()| always
starts from the beginning of the buffer and then searches for the end
while |stpcpy()| allows an application to always continue immediately
where the old string ended).
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
--f46d042f9bf07f40ca04c593f8e6
Content-Type: text/x-patch; charset=US-ASCII; name="astksh_stpcpy.diff"
Content-Disposition: attachment; filename="astksh_stpcpy.diff"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_h51271q10
ZGlmZiAtciAtdSAtTiBvcmlnaW5hbC9zcmMvY21kL2tzaDkzL2VkaXQvZW1hY3MuYyBidWlsZF9z
dHBjcHkvL3NyYy9jbWQva3NoOTMvZWRpdC9lbWFjcy5jCi0tLSBzcmMvY21kL2tzaDkzL2VkaXQv
ZW1hY3MuYwkyMDEyLTA2LTE5IDIyOjAxOjQzLjAwMDAwMDAwMCArMDIwMAorKysgc3JjL2NtZC9r
c2g5My9lZGl0L2VtYWNzLmMJMjAxMi0wNy0yNCAxNDoyMTo1Mi40NDUzNTExNDMgKzAyMDAKQEAg
LTExNzQsMjUgKzExNzQsMjYgQEAKIAkJY2FzZSBjbnRsKCdIJyk6CQkvKiBeWF5IIHNob3cgaGlz
dG9yeSBpbmZvICovCiAJCQl7CiAJCQkJY2hhciBoYnVmW01BWExJTkVdOworCQ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BBVCZUIEludGVsbGVjdHVhbCBQcm9w
ZXJ0eSAgICAgICAgICAgICoKKyogICAgICAgICAgICAgICAgICAgICAgYW5kIGlzIGxpY2Vuc2Vk
IHVuZGVyIHRoZSAgICAgICAgICAgICAgICAgICAgICAgKgorKiAgICAgICAgICAgICAgICAgRWNs
aXBzZSBQdWJsaWMgTGljZW5zZSwgVmVyc2lvbiAxLjAgICAgICAgICAgICAgICAgICAqCisqICAg
ICAgICAgICAgICAgICAgICBieSBBVCZUIEludGVsbGVjdHVhbCBQcm9wZXJ0eSAgICAgICAgICAg
ICAgICAgICAgICoKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorKiAgICAgICAgICAgICAgICBBIGNvcHkgb2Yg
dGhlIExpY2Vuc2UgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAqCisqICAgICAgICAg
IGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvb3JnL2RvY3VtZW50cy9lcGwtdjEwLmh0bWwgICAgICAg
ICAgICoKKyogICAgICAgICAod2l0aCBtZDUgY2hlY2tzdW0gYjM1YWRiNTIxM2NhOTY1N2U5MTFl
OWJlZmIxODA4NDIpICAgICAgICAgKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisqICAgICAgICAgICAgICBJ
bmZvcm1hdGlvbiBhbmQgU29mdHdhcmUgU3lzdGVtcyBSZXNlYXJjaCAgICAgICAgICAgICAgICoK
KyogICAgICAgICAgICAgICAgICAgICAgICAgICAgQVQmVCBSZXNlYXJjaCAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgIEZsb3JoYW0gUGFy
ayBOSiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisqICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyogICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgKgorKiAgICAgICAgICAgICAgICAgUm9sYW5kIE1haW56IDxyb2xhbmQubWFpbnpA
bnJ1YnNpZy5vcmc+ICAgICAgICAgICAgICAqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyoqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqLworI3ByYWdtYSBwcm90b3R5cGVkCisvKgorICogc3RwY3B5IGltcGxlbWVudGF0aW9uCisg
Ki8KKworI2RlZmluZSBzdHBjcHkJCV9fX19fX3N0cGNweQorCisjaW5jbHVkZSA8YXN0Lmg+CisK
KyN1bmRlZglzdHBjcHkKKworI3VuZGVmCV9kZWZfbWFwX2FzdAorI2luY2x1ZGUgPGFzdF9tYXAu
aD4KKworI2lmIF9saWJfc3RwY3B5CisKK05vTihzdHBjcHkpCisKKyNlbHNlCisKKyNpZiBkZWZp
bmVkKF9fRVhQT1JUX18pCisjZGVmaW5lIGV4dGVybglfX0VYUE9SVF9fCisjZW5kaWYKKworLyoK
KyAqIHxzdHBjcHl8IC0gbGlrZSB8c3RyY3B5KCl8IGJ1dCByZXR1cm5zIHRoZSBlbmQgb2YgdGhl
IGJ1ZmZlcgorICoKKyAqIENvcHkgc3RyaW5nIHMyIHRvIHMxLiAgczEgbXVzdCBiZSBsYXJnZSBl
bm91Z2guCisgKiByZXR1cm4gczEtMSAocG9zaXRpb24gb2Ygc3RyaW5nIHRlcm1pbmF0b3IgKCdc
MCcpIGluCisgKiBkZXN0aW5hdGlvbiBidWZmZXIpLgorICovCitjaGFyICpzdHBjcHkoY2hhciAq
czEsIGNvbnN0IGNoYXIgKnMyKQoreworCXdoaWxlICgqczErKyA9ICpzMisrKQorCQk7CisJcmV0
dXJuIChzMS0xKTsKK30KKworI2VuZGlmCmRpZmYgLXIgLXUgLU4gb3JpZ2luYWwvc3JjL2xpYi9s
aWJhc3Qvc3RyaW5nL3N0cG5jcHkuYyBidWlsZF9zdHBjcHkvL3NyYy9saWIvbGliYXN0L3N0cmlu
Zy9zdHBuY3B5LmMKLS0tIHNyYy9saWIvbGliYXN0L3N0cmluZy9zdHBuY3B5LmMJMTk3MC0wMS0w
MSAwMTowMDowMC4wMDAwMDAwMDAgKzAxMDAKKysrIHNyYy9saWIvbGliYXN0L3N0cmluZy9zdHBu
Y3B5LmMJMjAxMi0wNy0yNCAxNDo0ODoxMC40Mzc3MjAyNTMgKzAyMDAKQEAgLTAsMCArMSw2NSBA
QAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyogICAgICAgICAgICAgICBUaGlz
IHNvZnR3YXJlIGlzIHBhcnQgb2YgdGhlIGFzdCBwYWNrYWdlICAgICAgICAgICAgICAgKgorKiAg
ICAgICAgICAgICBDb3B5cmlnaHQgKGMpIDIwMTIgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkg
ICAgICAgICAgICAqCisqICAgICAgICAgICAgICAgICAgICAgIGFuZCBpcyBsaWNlbnNlZCB1bmRl
ciB0aGUgICAgICAgICAgICAgICAgICAgICAgICoKKyogICAgICAgICAgICAgICAgIEVjbGlwc2Ug
UHVibGljIExpY2Vuc2UsIFZlcnNpb24gMS4wICAgICAgICAgICAgICAgICAgKgorKiAgICAgICAg
ICAgICAgICAgICAgYnkgQVQmVCBJbnRlbGxlY3R1YWwgUHJvcGVydHkgICAgICAgICAgICAgICAg
ICAgICAqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICoKKyogICAgICAgICAgICAgICAgQSBjb3B5IG9mIHRoZSBM
aWNlbnNlIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgKgorKiAgICAgICAgICBodHRw
Oi8vd3d3LmVjbGlwc2Uub3JnL29yZy9kb2N1bWVudHMvZXBsLXYxMC5odG1sICAgICAgICAgICAq
CisqICAgICAgICAgKHdpdGggbWQ1IGNoZWNrc3VtIGIzNWFkYjUyMTNjYTk2NTdlOTExZTliZWZi
MTgwODQyKSAgICAgICAgICoKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorKiAgICAgICAgICAgICAgSW5mb3Jt
YXRpb24gYW5kIFNvZnR3YXJlIFN5c3RlbXMgUmVzZWFyY2ggICAgICAgICAgICAgICAqCisqICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIEFUJlQgUmVzZWFyY2ggICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICoKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBGbG9yaGFtIFBhcmsgTkog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisqICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICoKKyogICAgICAgICAgICAgICAgIFJvbGFuZCBNYWlueiA8cm9sYW5kLm1haW56QG5ydWJz
aWcub3JnPiAgICAgICAgICAgICAgKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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it9CisKKyNlbmRpZgo=
--f46d042f9bf07f40ca04c593f8e6--
Roland Mainz
2012-10-16 23:54:34 UTC
Permalink
Post by Glenn Fowler
Post by Roland Mainz
Attached (as "astksh_stpcpy.diff") is a small patch which adds
|stpcpy()| and |stpncpy()| to libast (if the system doesn't provide
them).
IMO it would be nice to put this _both_ into the ksh93u+ and ksh93v-
trees... risk should be very small (except there is a platform which
doesn't have |strnlen()|).
[snip]
Post by Glenn Fowler
Post by Roland Mainz
P.S.: ast-open needs a purge of cases where |strcat()| is used
multiple times in sequence, cases of |sprintf(buf, "%s%s", ...)| etc.
etc. and have these abdominations all replaced by |stpcpy()| (because
it's faster&&more efficient, e.g. |strcat(buf, "aaa"); strcat(buf,
"bbb");| can be replaced with |char *s=buf; s=stpcpy(s, "aaa");
s=stpcpy(s, "bbb");| ... this will be faster because |strcat()| always
starts from the beginning of the buffer and then searches for the end
while |stpcpy()| allows an application to always continue immediately
where the old string ended).
[snip]
Post by Glenn Fowler
except for some contributed ksh code ast does not use strcat()
from way back ast had strcopy() which is basically stpcpy()
if sizes are know we use strcopy() or memcpy()
otherwise the typical paradigm is to use stk*() or sfstr*()
no patches to ksh93u+ code base
"even the seemingly simplest change can wreak unforseen havoc"
we are only fixing dire ksh93u+ regressions at this point
and we are down to one of those on freebsd
for ksh93v- code base I will change strcopy() to use stpcpy()
and ast will provide stpcpy() if its not there
ast will also provide stpncpy() with an iffe for strnlen()
that will fall back to memchr()
Erm... ping! ...
... |stpcpy()| is still missing...
... should I re-send the patch ?

----

Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz at nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
Glenn Fowler
2012-10-17 01:54:23 UTC
Permalink
that will go in the tsast branch
still working on it
Post by Roland Mainz
Erm... ping! ...
... |stpcpy()| is still missing...
... should I re-send the patch ?
ольга крыжановская
2013-06-12 14:53:54 UTC
Permalink
Glenn, this patch was still not applied in ast-ksh.2013-06-11. Why?

Olga
Post by Glenn Fowler
that will go in the tsast branch
still working on it
Post by Roland Mainz
Erm... ping! ...
... |stpcpy()| is still missing...
... should I re-send the patch ?
_______________________________________________
ast-developers mailing list
ast-developers at research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ olga.kryzhanovska at gmail.com \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
ольга крыжановская
2013-07-22 02:29:43 UTC
Permalink
Glenn, the patch is still missing in ast-ksh. It would help with
valgrind, and other instrumentation tools, because they can intercept
the libc function, and then validate whether source and destination
constitute valid memory areas, with out overlap.

Olga

On Wed, Jun 12, 2013 at 4:53 PM, ????? ????????????
Post by ольга крыжановская
Glenn, this patch was still not applied in ast-ksh.2013-06-11. Why?
Olga
Post by Glenn Fowler
that will go in the tsast branch
still working on it
Post by Roland Mainz
Erm... ping! ...
... |stpcpy()| is still missing...
... should I re-send the patch ?
_______________________________________________
ast-developers mailing list
ast-developers at research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ olga.kryzhanovska at gmail.com \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
--
, _ _ ,
{ \/`o;====- Olga Kryzhanovska -====;o`\/ }
.----'-/`-/ olga.kryzhanovska at gmail.com \-`\-'----.
`'-..-| / http://twitter.com/fleyta \ |-..-'`
/\/\ Solaris/BSD//C/C++ programmer /\/\
`--` `--`
Loading...