CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 16 01:22:01 PST 2016


On Tuesday, 15 November 2016 at 23:46:51 UTC, Stefan Koch wrote:
> On Tuesday, 15 November 2016 at 22:50:49 UTC, deadalnix wrote:
>> On Tuesday, 15 November 2016 at 01:35:42 UTC, Stefan Koch 
>> wrote:
>>> However there is a a bug inside the code that does 
>>> bounds-checking for array assignment.
>>> In rare cases it can trigger a out-bounds-error on newly 
>>> created arrays.
>>>
>>
>> This raise all kind of red flags to me. What are the design 
>> decision that lead to this ?
>
> I am still figuring out when and why the bug is caused.
> The Byte-code for slice allocation is rather complex.
> Because it has to deal with resizing slices as well.
> I suspect that somewhere the heapPtr is not bumped or the 
> length is not set correctly.

Indeed the length was not set on a code-path meant for resizeing.
The problem is fixed :)

The HeapLimit has been raised to a more reasonable limit of 2 ^^ 
24 Addresses. (Which means that you'll have 2 ^^ 24 Bytes in 
practice.)



More information about the Digitalmars-d mailing list