On Mon, Aug 18, 2014 at 7:33 AM, Henri Kemppainen <[email protected]> wrote:

> Hi, I encountered this problem while trying an application that uses SDL2.
> It turns out that SDL2 opens, closes, and reopens some shared objects from
> the X11 sets.  And doing that in the specific order it does, one of the
> eventual dlopen calls will crash.  Here's a minimal test case:

...

> There are some other combinations of shared objects that will also result
> in
> the same crash.  It can be worked around by changing the order in which
> they
> are opened or closed (changing both works too).  Nothing in the man page
> suggests to me that the order should be critical, so this looks like a bug.
>

Yep.


I might dig deeper once I find the time, but perhaps someone already
> familiar with the code might want to take a look at it before I waste a
> week on it ;-)
>

The issue is the change in ld.so/library_subr.c rev 1.34.  If you back that
change out, the crash disappears.

The problem is that no one makes changes to the linkages inside ld.so out
of boredom: there was some previous program that crashed without that
change, but the details weren't documented or preserved in a regress/
program.  I've made a couple stabs at reproducing the original program so
that we can be sure to keep it fixed when fixing this, but haven't been
able to pin down a case where the committed change solved the problem.  If
you can figure that out, I would gladly buy you a beer or three.  Elsewise
we're reaching the point where we back that change out and wait for someone
complain...  :-(

Philip Guenther

Reply via email to