This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bounded-pointer flag


It was suggested that I send a note to this list re: the possibly
obsolete -fbounded-pointers flag in glibc that's evoked by the
--enable-bounded configuration setting. As noted below, I got the
impression that the current gcc versions (4.x.x) use -fbounds-check to
accomplish the same thing. If not, if there's no compiler flag
equivalent to the obsolete one mentioned here, perhaps that flag should
be removed, or disabled for recent versions of gcc that can't use it.

There's a library called libsafe that is made to over-write certain i/o
functions to prevent buffer over-runs, etc. If that can be built into
glibc as an option by a bounds-checking setting, that might be nice to have.

John T

On Wednesday 11 March 2009 09:53:08 JohnT wrote:

> > Hi. Recently I've been trying to build glibc from tarballs from
> > http://ftp.gnu.org/gnu/glibc/, working with versions 2.4, 2.5.1, 2.6.1,
> > 2.7 and 2.9. I've found several issues that I didn't find in the glibc
> > bugzilla or mail archive.
> >
> > System: Mandriva 2006 Powerpack, i686, installed kernel 2.6.12, glibc
> > 2.3.5, gcc 4.2.4 (secondary version 4.0.1), gettext 0.17, binutils 2.18,
> > gmp 4.2.4, mpfr 2.31.
> >
> > Here's a build error set off by trying the option --enable-bounded. I
> > think the correct gcc compiler flag is -fbounds-check (or if
> > single-threaded, -fmudflap). Wherever the build script is (not in
> > Makefile), it uses this wrong gcc flag. Because I don't know where the
> > real build script is, I was unable to fix it. I didn't check out all of
> > the above versions for this, but several have the wrong flag.
>   

neither of those flags are correct.  the flag name "-fbounded-pointers" is 
correct, it's just that recent versions of gcc no longer supported it.

you could argue that the configure option should probably just be dropped 
nowadays ... feel free to post that to libc-alpha@sourceware.org ...
-mike



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]