Are __BOUNDED_POINTERS__ supported?

Steven Munroe sjmunroe@us.ibm.com
Tue Mar 25 17:46:00 GMT 2003


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?




More information about the Libc-hacker mailing list