On 7/21/20 8:34 AM, Adam D. Ruppe wrote:

The others aren't wrong about stack size limits playing some role, but the primary reason is that it is a weird hack for @safe, believe it or not.
...
I don't recall exactly when this was discussed but it came up in the earlier days of @safe, I'm pretty sure it worked before then.

I think this was discussed, but was not the reason for the limitation. The limitation exists even in D1, which is before @safe: https://digitalmars.com/d/1.0/arrays.html#static-arrays

I have stressed before that any access of a pointer to a large object in @safe code should also check that the base of the object is not within the null page (this is not currently done). This is the only way to ensure safety.

-Steve

Reply via email to