F*cked by memory corruption after assiging value to associative array
frame
frame86 at live.com
Mon Jan 25 11:15:28 UTC 2021
After a while my program crashes.
I'm inspecting in the debugger that some strings are overwritten
after a struct is assigned to an associative array.
- I have disabled the GC.
- All happens in the same thread.
- The strings belong to an object collection inside an object
created from a d-DLL.
- The object returned by the DLL function is added to the GC with
GC.addRoot().
- This object also lives in a static array the whole time.
- Not all objects are affected but many.
- The struct itself looks okay also the key for the associative
array has normal form.
The data is not overwritten by another Thread (only one is
running) but by the compiler. I'm watching it by memory location.
It gets always visible first after that assignment. But how is
this even possible? In theory, how could I ran into this issue?
More information about the Digitalmars-d-learn
mailing list