New adapter: std.allocator.quantizer
Timon Gehr via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 12 12:57:53 PDT 2015
On 05/12/2015 04:54 AM, Andrei Alexandrescu wrote:
> On 5/11/15 4:59 PM, Timon Gehr wrote:
>> On 05/11/2015 08:48 PM, Andrei Alexandrescu wrote:
>>> On 5/11/15 11:31 AM, Timon Gehr wrote:
>>>> - The assertion in line 141 may fail. (expand can return false.)
>>>
>>> OK, it seems the previous commit should take care of that.
>>> ...
>>
>> Nope.
>>
>> Well, yes, in the sense that there is no longer a possibly failing
>> assertion on line 141.
>>
>> In any case, 'allocate' within 'expand' may fail, and if it does, b.ptr
>> will still be null throughout the body of reallocate/alignedReallocate.
>
> Somebody shoot me :o).
>
> https://github.com/andralex/phobos/commit/18d5cd9526db5057cacff5832a6246d1f84ada2a
> ...
Missed alignedReallocate. :o)
On a related note, alignedReallocate is now also buggy in that it does
not necessarily align the allocated memory if b.ptr is null.
More information about the Digitalmars-d
mailing list