F*cked by memory corruption after assiging value to associative array

frame frame86 at live.com
Thu Jan 28 07:50:43 UTC 2021


On Wednesday, 27 January 2021 at 22:57:11 UTC, tsbockman wrote:

>
> There is supposed to only be one instance of the D GC running 
> per process. If you have more than one running then either you 
> aren't linking and loading the DLLs correctly, or you have run 
> into a serious bug in the D tooling.

What could I do wrong by just using SimpleDllMain and then put my 
exports?
build line for DLL is: rdmd -shared --build-only -gf -m64

Under Linux everything is shared. Under Windows each DLL seems to 
run in its own thread, has its own rt_options and do not see any 
__gshared variable value. Its completely isolated and so I assume 
that also GC is.


Also https://wiki.dlang.org/Win32_DLLs_in_D says: Each EXE and 
DLL will have their own gc instance.

I also wonder why the static linked DLL should use a GC proxy 
while as SimpleDllMain does nothing with a proxy - should 
loadLibrary() take care off here automatically? It seems, it does 
not.



More information about the Digitalmars-d-learn mailing list