runtime crashes with "rt/sections_elf_shared.d(688) _handleToDSO not in sync with _loadedDSOs"

Arjan arjan at ask.me.to
Thu Nov 16 17:59:56 UTC 2023


On Wednesday, 15 November 2023 at 22:41:19 UTC, Jaap Geurts wrote:
> I apologize if this has been asked before but I couldn't find 
> help here or anywhere else.
>
> [...]

I do not understand what you want to achieve, but maybe (ab)using 
the 
[`atexit`](https://en.cppreference.com/w/cpp/utility/program/atexit)from the D shared object to register a function *in* the D shared object at app exit?
Be-aware when [`dlclose`](https://linux.die.net/man/3/dlclose) 
*is* used on the D shared object, the app will crash due to the 
function-pointer pointing to already unmapped lib function is 
called by `atexit`.

I however never tried this, might not work.


More information about the Digitalmars-d mailing list