GC allocation issue

Etienne etcimon at gmail.com
Fri Mar 21 07:34:38 PDT 2014


On 2014-03-21 9:36 AM, Etienne wrote:
> With ptop= 03D8F030, pbot= 03E4F030
>
> They both point invalid memory. It looks like a really wide range too,
> the usual would be 037CCB80 -> 037CCBA0 or such. I don't know how to
> find out where they come from... Maybe I could do an assert on that
> specific value in druntime

Looks like the range of the string[] keys array, it gets pretty big 
after adding 10000s of strings.

+GC.addRange(p = 03EA0AB0, sz = 0x38), p + sz = 03EA0AE8
set: 209499732595 => ¨98303126
+GC.addRange(p = 03EA0B40, sz = 0x38), p + sz = 03EA0B78
set: 6491851329 => ¨50107378
+GC.addRange(p = 03EA0BD0, sz = 0x38), p + sz = 03EA0C08
set: 262797465895 => ¨14438090
+GC.addRange(p = 03EA0C60, sz = 0x38), p + sz = 03EA0C98
set: 95992076217 => ¨65000864
+GC.addRange(p = 03EA0CF0, sz = 0x38), p + sz = 03EA0D28
+GC.addRange(p = 03EA0D50, sz = 0x30000), p + sz = 03ED0D50

It crashes when sz approaches 0x180000, it looks like (my best guess) 
the resized array doesn't get allocated but the GC still tries to scan it.


More information about the Digitalmars-d-learn mailing list