Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 11 Nov 2014 15:56:33 +0200
From: Timo Teras <>
To: Rich Felker <>
Subject: Re: Nonstandard functions with callbacks

On Tue, 11 Nov 2014 08:46:53 -0500
Rich Felker <> wrote:

> While of course I can't make the decision for you, I'd really
> encourage distros not to add to or change the public API in musl in
> ways that are not expected to ever make it upstream. The result is
> application binaries that have an undocumented dependency on your
> distro-specific version of musl and that won't work elsewhere, which
> is not so much of an issue for your own distro binaries, but is a
> potential gotcha for anyone compiling their own binaries on your dist
> and expecting them to work on other musl-based systems. Up to now I've
> been trying to reduce and hopefully eliminate the Alpine patches to
> musl that affect public interfaces and I think we're almost there.

Yes, we are not doing hasty decisions. So it's on hold for the time
being. I filed bug against Asterisk to see what happens. They are
supposed supporting Solaris and Mingw, which both lack this
functionality. It seems to have broken on Asterisk 13. Well TLS will
not work without that, but in Asterisk 13 they broke regular non-TLS
tcp connections...

> Have you looked at what other programs do as a fallback when there's
> no fopencookie? I don't think it's possible to match the API 100% with
> this approach (seeking won't work, for instance), but it seems
> possible to do a fallback implementation based on pthread_create and
> socketpair that doesn't depend on implementation internals of stdio,
> so that it could go into the application or a shim library.

No. This is not simple. The read and write callbacks take timer
value from cookie, and they block up until specific timeout. So yeah,
it goes basically even weirder. They modify semantics of fread() and
fwrite() which is kinda nasty.

Either way it's a can of worms. So we are stopping for a moment and
re-evaluating options.


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.