Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Fri, 17 May 2013 13:37:10 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Broken silent glibc-specific assumptions uncovered by musl

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.)

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.