From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/3347 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: patch: make the size of errbuf configurable Date: Sun, 19 May 2013 18:09:42 -0400 Message-ID: <20130519220941.GJ20323@brightrain.aerifal.cx> References: <5199324A.7020805@eservices.virginia.edu> <20130519210341.GG20323@brightrain.aerifal.cx> <51994949.1060305@eservices.virginia.edu> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1369001395 16711 80.91.229.3 (19 May 2013 22:09:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 May 2013 22:09:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-3351-gllmg-musl=m.gmane.org@lists.openwall.com Mon May 20 00:09:55 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1UeBne-0005Wr-RC for gllmg-musl@plane.gmane.org; Mon, 20 May 2013 00:09:54 +0200 Original-Received: (qmail 8105 invoked by uid 550); 19 May 2013 22:09:54 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 8092 invoked from network); 19 May 2013 22:09:54 -0000 Content-Disposition: inline In-Reply-To: <51994949.1060305@eservices.virginia.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:3347 Archived-At: On Sun, May 19, 2013 at 05:51:05PM -0400, Z. Gilboa wrote: > >My preference is that either long pathnames should be truncated in a > >reasonable way (keep in mind that the message is *not* parsable by the > >caller; the only way it can be used is presenting it to the user) > certainly; the initial motivation was log-file processing. > > >or > >larger buffers should be dynamically allocated. The only reason I did > >not go the dynamic-allocation path to begin with was to make it so > >non-thread-safe usage of dlerror yields (at worst) corrupted messages > >rather than crashes. This can also be achieved with dynamic allocation > >(as long as the old too-short buffer is never freed), but it's more > >complex. > > In my understanding, the current approach of having a fixed buffer > size is by far the superior one. Could you elaborate as to why? Are you concerned about memory usage? Code complexity? Or some other reason? Rich