mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: Re: Last call for bugfixes for 1.0
Date: Sun, 16 Mar 2014 11:25:33 -0400	[thread overview]
Message-ID: <20140316152533.GG26358@brightrain.aerifal.cx> (raw)
In-Reply-To: <5325BE5E.6020001@rwth-aachen.de>

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


  reply	other threads:[~2014-03-16 15:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-15  7:52 Rich Felker
2014-03-15 21:29 ` David Grothe
2014-03-15 22:26   ` Rich Felker
2014-03-16 15:08 ` Thomas Kreuzer
2014-03-16 15:25   ` Rich Felker [this message]
2014-03-16 18:28     ` Thomas Kreuzer
2014-03-16 19:06       ` Rich Felker
2014-03-17  1:34 ` orc
2014-03-17  1:37   ` Rich Felker
2014-03-17  3:28     ` orc
2014-03-17  3:41       ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140316152533.GG26358@brightrain.aerifal.cx \
    --to=dalias@aerifal.cx \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).