[Issue 24377] Error: negative array dimension `3145728u * 1024u`[32bit]
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 10 12:21:47 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24377
--- Comment #3 from Iain Buclaw <ibuclaw at gdcproject.org> ---
You're allocating an array that takes up more than half the address space, so
that is already pretty dubious.
Note: this is the case on 64-bit too if you request an array size bigger than
`long.max`.
auto arr = new char [1u + long.max];
// Error: negative array dimension `1LU + 9223372036854775807LU`
--
More information about the Digitalmars-d-bugs
mailing list