This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: Esthetics (or worse?) of Secure Pointers


On Tue, Apr 17, 2001 at 04:36:01PM -0700, Greg McGary wrote:
> Chris Lattner <sabre@nondot.org> writes:
> 
> > Another alternative way to implement this (which would allow a single libc
> > that contains both bounded pointer code and nonbounded pointer code to
> > exist in the same library), would be to mangle function names, ala
> > C++.  Of course you could do this really simply by simply prefixing all
> > functions (C as well) with __BP_ or some such ugly thing.
> 
> I want to move in the opposite direction, and drop the __BP_ prefix,
> since it complicates symbolic debugging, and I don't want to burden
> gdb with hiding the prefix.  OTOH, the reason I introduced the prefix
> in the first place remains valid: I wanted to catch unintentional
> mixing of BP and non-BP code at link time, so as to prevent
> much-more-painful-to-debug runtime incompatibilities.  Perhaps that
> can be accomplished some other way.

Could we maybe (ab)use the C++ name mangler for this?  'BPi' for
bounded pointer to int, say, and instead of __BP_memcpy, we have
_Z6memcpyBPvBPvm.  gdb then just works.

I've been considering some sort of toggle to make gcc emit mangled
symbols for C code for awhile.  The original idea was to catch
prototype mismatches at link time; there'd be no change to C
semantics.

zw


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