From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4664 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: Last call for bugfixes for 1.0 Date: Sun, 16 Mar 2014 11:25:33 -0400 Message-ID: <20140316152533.GG26358@brightrain.aerifal.cx> References: <20140315075223.GA27718@brightrain.aerifal.cx> <5325BE5E.6020001@rwth-aachen.de> 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 1394983539 26622 80.91.229.3 (16 Mar 2014 15:25:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 16 Mar 2014 15:25:39 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4668-gllmg-musl=m.gmane.org@lists.openwall.com Sun Mar 16 16:25:47 2014 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 1WPCwc-0001hc-UC for gllmg-musl@plane.gmane.org; Sun, 16 Mar 2014 16:25:47 +0100 Original-Received: (qmail 25968 invoked by uid 550); 16 Mar 2014 15:25:46 -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 25947 invoked from network); 16 Mar 2014 15:25:45 -0000 Content-Disposition: inline In-Reply-To: <5325BE5E.6020001@rwth-aachen.de> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:4664 Archived-At: On Sun, Mar 16, 2014 at 04:08:14PM +0100, Thomas Kreuzer wrote: > Hello everyone, > > I noticed that I am unable to wirte my own fgetln function inside a > static linked library, even though fgetln should only be exposed by > GNU_SOURCE or BSD_SOURCE, or shouldn't it? > > I compile with "-std=c99 and -D_XOPEN_SOURCE=700" > > Everything compiles fine, but seg faults, when the function is used > in a running program, if I rename the function, everything works as > expected. > > Somehow the musl function fgetln interferes with my fgetln function. Have you done analysis to determine that this has anything to do with musl's fgetln function? Short of that, I suspect it's just an ordinary crash in your fgetln. There's no reason they should be interfering; for static linking, if fgetln is already defined then musl's fgetln.o won't even get linked, and for dynamic linking, your symbol overrides and nothing else accesses musl's fgetln symbol. Rich