https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88150

--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> ---
> --- Comment #8 from Johannes Pfau <johannespfau at gmail dot com> ---
> Regarding the _d_dso_registry issue: Yes, as far as I can see it is a bug that
> handleForName dlcloses the handle here. I think what happened is this:
>
> handleForName is used in one place with the comment
> // get handle without loading the library
> so it is supposed to unload the library there.
> But it is also called from handleForAddr which is used to get the DSO handle 
> to
> be stored using setDSOForHandle. I think here, it's not really valid to store
> the closed handle.

If the dlclose is indeed invalid, my workaround of disabling it explains
3 of the 4 remaining libphobos.shared failures.  If I disable the
dlclose unconditionally and rerun the libphobos.shared tests on
Linux/x86_64, I get those failures there, too, both 64 and 32-bit:

FAIL: libphobos.shared/load.d -shared-libphobos -ldl execution test
FAIL: libphobos.shared/load_13414.d -shared-libphobos -ldl execution test
FAIL: libphobos.shared/finalize.d -shared-libphobos -ldl execution test

Reply via email to