Bug in std.allocator?

ag0aep6g via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Oct 25 06:21:07 PDT 2016


On 10/25/2016 11:30 AM, Benjamin Thaut wrote:
> Please consider the following program:
[...]
> I would assume that this program should run forever and never run out of
> memory. But instead it triggers an assert inside alocator_list in pass
> 11. So I assume this is some bug in std.allocator?

I can confirm the crash with 2.071.2. But it doesn't happen with 
2.072.0-b2. So, bug that has already been fixed?

> Also whats interresting. The first allocation in each new pass is _not_
> the last allocation to be freed. Instead it seems to "leak" one
> allocation each pass.
>
> From the output of the program:
>
> 229a290fd60 <- same
> 229a2932570 <- leaked?
> pass 11
> 229a290fd60 <- same

Also looks ok with 2.072.0-b2:

7f448c7ccdb0
7f448c7cd200
pass 99
7f448c7cd200
7f448c7ccdb0



More information about the Digitalmars-d-learn mailing list