[Issue 14126] GITHEAD - GC seemingly corrupting memory

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Feb 6 00:30:51 PST 2015


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

sinkuupump at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sinkuupump at gmail.com

--- Comment #8 from sinkuupump at gmail.com ---
It seems FooBar class isn't required.


import core.stdc.stdio;

struct Foo {
    private uint _foo = 1;

    ~this() {
        printf("%d\n", _foo);
    }
}

void main() {
    Foo[] foos;
    foos.length = 512;
}


This prints "1" with 2.066.1, but prints "16777216" with 2.067a. On my system,
array length must be >= 510 to reproduce the bug.

--


More information about the Digitalmars-d-bugs mailing list