https://issues.dlang.org/show_bug.cgi?id=24436

--- Comment #9 from Tim <[email protected]> ---
Here is a more direct test:

```
import core.memory;

void main()
{
        int[][] array1 = new int[][](2,2);
        assert(!(GC.getAttr(array1.ptr) & GC.BlkAttr.NO_SCAN)); // fails now
        assert(GC.getAttr(array1[0].ptr) & GC.BlkAttr.NO_SCAN); // passes

        int*[][] array2 = new int*[][](2,2);
        assert(!(GC.getAttr(array2.ptr) & GC.BlkAttr.NO_SCAN)); // passes
        assert(!(GC.getAttr(array2[0].ptr) & GC.BlkAttr.NO_SCAN)); // passes
}
```

The attributes are wrong for the outer array of array1. As a result the GC does
not scan it and reuses the memory for the inner arrays.

--

Reply via email to