mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Broken silent glibc-specific assumptions uncovered by musl
Date: Fri, 17 May 2013 13:37:10 -0400	[thread overview]
Message-ID: <20130517173710.GA14240@brightrain.aerifal.cx> (raw)

Hi all,

There's been at least one request for putting together a list of
"silent" application bugs uncovered by building against musl
applications which were previously used mainly/only with glibc. By
silent, I mean things that are not easily caught as configure- or
compile-time errors, but which cause the application to misbehave at
runtime.

I'm writing down here what I can think of off-hand. This list should
probably be expanded by the community and perhaps put on the wiki.
Here's what I have so far:



Assuming that dlerror is thread-local. (POSIX previously required it
to be global; as of 2008-TC1, either behavior is allowed.)

Assuming dlclose actually unloads a library (and calls dtors), so that
a future dlopen will reset static objects to their initial state (and
re-run ctors). (POSIX leaves this implementation-defined, and
unloading is impossible to do safely in general, so robust
implementations will not do it.)

Making wrong assumptions about fsync and fdatasync. (I'm not familiar
with this issue so somebody else will have to fill it in.)

Calling exit from global destructors. (If an application calls exit
more than once, the behavior is undefined.)

Assuming pthread_cancel unwinds and calls destructors. (Interaction
between cancellation and C++ is undefined.)

Use of GNU extensions in regular expressions, especially
backslash-prefixed versions of ERE operators in BRE. (Undefined.)

Assuming iconv reports characters that cannot be represented in the
dest charset via EILSEQ. (This behavior is non-conforming; POSIX
requires an implementation-defined replacement and positive return
value in this case.)

Use of deprecated charset aliases with iconv_open, for example, using
"UNICODE" to mean UCS-2. (The list of charsets is
implementation-defined, but common sense dictates using the IANA
preferred MIME charset names, and especially not misleading names.)



             reply	other threads:[~2013-05-17 17:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-17 17:37 Rich Felker [this message]
2013-05-18  9:18 ` Szabolcs Nagy
2013-05-18  9:31   ` Daniel Cegiełka
2013-05-18 14:15   ` Rich Felker
2013-05-18 22:51     ` Szabolcs Nagy
2013-05-19 22:08       ` Rich Felker
2013-05-20  0:17         ` Szabolcs Nagy
2013-05-20  0:23           ` 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=20130517173710.GA14240@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).