On Thursday, 26 January 2017 at 11:59:48 UTC, Patrick Schluter wrote:
On Thursday, 26 January 2017 at 07:27:13 UTC, Stefan Koch wrote:
On Wednesday, 25 January 2017 at 12:36:02 UTC, Stefan Koch wrote:
char* initPtr()
{
    return cast(char*) size_t.max;
}

static assert(cast(size_t)initPtr() == size_t.max);

Because it would try to return the char-value at heap-address size_t.max; newCTFE allocates a 16MB heap by default and therefore the address was hopelessly out-of-bounds.


I do not understand why it should dereference the pointer? Do you mean that the bug was that newCTFE dereferenced but it shouldn't or that oldCTFE didn't dereference but it should have?

newCTFE should not dereference that pointer.

However since all other pointers need to be dereferenced, this bug came totally out of the blue.

Reply via email to