-
-
Notifications
You must be signed in to change notification settings - Fork 273
druntime: Generalize 'shared' integration tests to include Windows #3736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@rainers: Do you happen to have insights regarding CRT dtors and DLLs? The first hurdle I'm seeing here wrt. loading and unloading DLLs at runtime is that the CRT ctors are invoked just fine, but the dtors aren't after |
|
Oh, I've obviously looked at the wrong DllMain source - the correct one is in Registering the 'dtor' manually via |
Much nicer for debugging/troubleshooting.
There is also
IIRC there is a DLL local list of atexit funtions to call on unload. Didn't we implement that in the mingw-based DLLs? |
Exactly, and that's why it works just fine.
Yes - https://github.com/ldc-developers/mingw-w64-libs/blob/33aa1e813061cde47d2a66635eccb8b09c427f71/msvcrt_stub.c#L59. I haven't tested the new DLLs with those libs at all though. Druntime's I've also tried to radically simplify the |
A shared D runtime DLL will contain core.Thread, but not the actual thread code, so that mechanism has to be adapted (or ignored) anyway.
While threads should only be attached to by the shared runtime, thread local data in the DLL still needs to be initialized. The flags passed to |
AFAICT, this is all working just fine without these extra hooks - if the thread is started via |
Ok, that might work because you now register the DLL in the D runtime DLL in ldc-developers/druntime#197 |
|
Ah yeah sorry, should have emphasized that the 3 extra Windows tests are now tested with shared druntime.dll, not static druntime anymore. - I'll just use the static one for the |
Testing ldc-developers/druntime#198.