* Are __BOUNDED_POINTERS__ supported?
@ 2003-03-25 17:46 Steven Munroe
2003-03-25 20:52 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Steven Munroe @ 2003-03-25 17:46 UTC (permalink / raw)
To: libc-hacker, Alan Modra
Are __BOUNDED_POINTERS__ still a supported feature of glibc?
I've been looking a optimization of the string (strlen/strcmp/strcpy)
functions for PPC64 and noticed several:
/* GKM FIXME: check high bounds. */
Which was inherited from PPC32. Also that the usage of the
__BOUNDED_POINTERS_ macros don't seem correct. For example
sysdeps/powerpc/powerpc32/strchr.S contains:
L(missed):
and. rTMP1, rTMP1, rTMP2
li rRTN, 0
STORE_RETURN_VALUE (rSTR)
which will generate:
...
li rRTN, 0
stw rSTR,0(rRTN)
which will genrate a segfault. So bounded pointers are not working for
pp32/ppc64.
Then I tried using gcc to generate some examples of bounded-pointers and
bounds-checking using -fbounds-check -fbounded-pointers options. But
there is no difference in the generated asm (with or without this options).
So are __BOUNDED_POINTERS__ still supported? And should I put effort
into fixing the PPC32/PPC64 code?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Are __BOUNDED_POINTERS__ supported?
2003-03-25 17:46 Are __BOUNDED_POINTERS__ supported? Steven Munroe
@ 2003-03-25 20:52 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2003-03-25 20:52 UTC (permalink / raw)
To: sjmunroe; +Cc: libc-hacker, Alan Modra
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steven Munroe wrote:
> Are __BOUNDED_POINTERS__ still a supported feature of glibc?
The ppc side was never fully finished. x86 should still basically work.
It's not really supported but I am reluctant to remove the code since
it might come in handy for some error schecking scheme. Feel free to
remove any BP code which you know won't work, though.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+gJX82ijCOnn/RHQRApcSAJ9oJU+CNQJ9irkloEwIWmPIlPTRBACdF6PG
FZomgy1gpVVjxZSyUBmZc1o=
=EgOx
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-25 17:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-25 17:46 Are __BOUNDED_POINTERS__ supported? Steven Munroe
2003-03-25 20:52 ` Ulrich Drepper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).