Date: Sun, 16 Mar 2014 11:25:33 -0400 From: Rich Felker <dalias@...ifal.cx> To: musl@...ts.openwall.com Subject: Re: Re: Last call for bugfixes for 1.0 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
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.