Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2003 11:23:52 -0500
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        Harti Brandt <brandt@fokus.fraunhofer.de>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: `Hiding' libc symbols
Message-ID:  <20030506162352.GC78486@madman.celabo.org>
In-Reply-To: <20030506175017.C631@beagle.fokus.fraunhofer.de>
References:  <20030501182820.GA53641@madman.celabo.org> <20030505110601.H53365@beagle.fokus.fraunhofer.de> <20030506093754.B838@beagle.fokus.fraunhofer.de> <3EB7CC73.9C61C27E@mindspring.com> <20030506165850.Y601@beagle.fokus.fraunhofer.de> <20030506152605.GE77708@madman.celabo.org> <20030506175017.C631@beagle.fokus.fraunhofer.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 06, 2003 at 05:53:16PM +0200, Harti Brandt wrote:
> JAV>Or stated more agressively, the day the FreeBSD toolchain refuses
> JAV>to allow me to define my own version of strlcpy _for use by my
> JAV>application_ is the day I find another development platform.
> 
> So if you 'hide' all the libc symbols you will to exactly that. 

Of course not.  I can define strlcpy like so

  void
  strlcpy(struct string *a, struct string *b)
  {
	  if (a->size == 0) {
		  b->size = 0;
		  return;
	  }
	  /* really copy the string */
  }

if I want to, and my application will then behave exactly as my insane
mind expects.  (this is just a sillier example of the real world
problem that was encountered)

However, since strlcpy is _not_ protected/hidden today, my application
as a whole will likely not behave as I expect.  I'll innocently call
something like getaddrinfo() and *BOOM*. :-)

Cheers,
-- 
Jacques Vidrine   . NTT/Verio SME      . FreeBSD UNIX       . Heimdal
nectar@celabo.org . jvidrine@verio.net . nectar@freebsd.org . nectar@kth.se



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030506162352.GC78486>