Re: Memory Corruption Issue??

2016-03-09 Thread Bottled Gin via Digitalmars-d
The fix turned out to be much simpler than what I had thought. https://github.com/D-Programming-Language/druntime/pull/1506

Re: Memory Corruption Issue??

2016-03-06 Thread Bottled Gin via Digitalmars-d
Greetings I am using my D code as a dynamically loadable library that gets loaded at run time into C/C++ world. As discussed earlier on this thread, the GC does not mark TLS objects in this scenario and as a result the GC ends up collecting TLS objects even though these objects are still in

Re: Memory Corruption Issue??

2016-01-20 Thread Bottled Gin via Digitalmars-d
Thanks Daniel I have added the testcase to a more obscure testcase that I had raised on Bugzilla earlier. https://issues.dlang.org/show_bug.cgi?id=15513 I want to request developers to show some love. Regards - Puneet

Memory Corruption Issue??

2016-01-20 Thread Bottled Gin via Digitalmars-d
I need the developers' love and help to get this issue fixed. There is some bleak chance that I am doing something wrong while loading the D library from C code. But otherwise it looks like a DMD memory corruption issue. Since two C, and one D files are involved in recreating the issue, I have

Re: Memory Corruption Issue??

2016-01-20 Thread Johannes Pfau via Digitalmars-d
Am Wed, 20 Jan 2016 09:12:57 + schrieb Bottled Gin : > Greetings > > I am struggling with strange memory corruption issues with > dmd-2.069.2 release. > Could be GC scanning issues. Can you try disabling the garbage collector and see if it still crashes?

Re: Memory Corruption Issue??

2016-01-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 20 January 2016 at 09:12:57 UTC, Bottled Gin wrote: Greetings I am struggling with strange memory corruption issues with dmd-2.069.2 release. [...] As a workaround you can mark Hash class as a shared final shared class Hash

Re: Memory Corruption Issue??

2016-01-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 20 January 2016 at 11:49:29 UTC, Daniel Kozak wrote: On Wednesday, 20 January 2016 at 09:12:57 UTC, Bottled Gin wrote: Greetings I am struggling with strange memory corruption issues with dmd-2.069.2 release. ... ./main Start frop from C 0 -> @�+ The last line

Re: Memory Corruption Issue??

2016-01-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 20 January 2016 at 11:06:53 UTC, Daniel Kozak wrote: On Wednesday, 20 January 2016 at 09:12:57 UTC, Bottled Gin wrote: Greetings I am struggling with strange memory corruption issues with dmd-2.069.2 release. [...] As a workaround you can mark Hash class as a shared final

Re: Memory Corruption Issue??

2016-01-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 20 January 2016 at 11:08:46 UTC, Daniel Kozak wrote: On Wednesday, 20 January 2016 at 11:06:53 UTC, Daniel Kozak wrote: On Wednesday, 20 January 2016 at 09:12:57 UTC, Bottled Gin wrote: Greetings I am struggling with strange memory corruption issues with dmd-2.069.2 release.

Re: Memory Corruption Issue??

2016-01-20 Thread Daniel Kozak via Digitalmars-d
On Wednesday, 20 January 2016 at 09:12:57 UTC, Bottled Gin wrote: Greetings I am struggling with strange memory corruption issues with dmd-2.069.2 release. ... ./main Start frop from C 0 -> @�+ The last line is the content of an array which is actually filled with only

Re: Memory Corruption Issue??

2016-01-20 Thread Bottled Gin via Digitalmars-d
Another workaround is to use GC.addRoot for dynamic allocated data in Dynamic.proc void proc () { import core.memory: GC; dash.length = 32; GC.addRoot(cast(void*)dash.ptr); dash[] = '-'; } And another one is hold pointer to data: class Dynamic { static char[] space;

Re: Memory Corruption Issue??

2016-01-20 Thread Daniel Kozak via Digitalmars-d
V Wed, 20 Jan 2016 13:58:46 + Bottled Gin via Digitalmars-d napsáno: > >> Another workaround is to use GC.addRoot for dynamic allocated > >> data in Dynamic.proc > >> > >> void proc () { > >> import core.memory: GC; > >> dash.length = 32; > >>