On Fri, 02 Jul 2010 14:50:53 -0400, Steven Schveighoffer <[email protected]> wrote:

On Fri, 02 Jul 2010 13:01:41 -0400, Ali Çehreli <[email protected]> wrote:

I've also discovered that a basic array invariant is violated at size 509 as well:

import std.string;
import std.array;

void main()
{
     int[] a;
     a.length = 509;
     a ~= 0;

     assert(a.capacity >= a.length,
            format("capacity: %s length: %s", a.capacity, a.length));
}

Outputs

[email protected](17444): capacity: 509 length: 510

I will update the bug with these.

Thanks.  I just figured this one out :)  Very interesting bug indeed.

FYI: http://www.dsource.org/projects/druntime/changeset/317

-Steve

Reply via email to