Thread overview
[phobos] Unit tests broken again. Bad AAs?
Mar 22, 2010
Don Clugston
March 22, 2010
It seems that one of the druntime commits after 270
(probably 271, "reduce memory consumption of small AA's") has broken
the Phobos unittests. json.d is now failing.
March 22, 2010
Yes, I saw that too. Walter has changed the implementation of AAs, and the relative ordering of keys has changed. The contents of the arrays involved in the failure seems to be equal, so the bug is in the AA comparison operator.

(I think what happens is that now the exact ordering of elements depends on history, i.e. the order in which they were inserted. In the previous implementation the ordering was history-independent.)

Andrei

On 03/22/2010 08:58 AM, Don Clugston wrote:
> It seems that one of the druntime commits after 270
> (probably 271, "reduce memory consumption of small AA's") has broken
> the Phobos unittests. json.d is now failing.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
March 22, 2010
Any code that relies on AA's storing keys in the same order is broken.  A rehash can reorder keys at any time, I think even with the old implementation.

-Steve



----- Original Message ----
> From: Andrei Alexandrescu <andrei at erdani.com>
> To: Discuss the phobos library for D <phobos at puremagic.com>
> Sent: Mon, March 22, 2010 10:45:11 AM
> Subject: Re: [phobos] Unit tests broken again. Bad AAs?
> 
> Yes, I saw that too. Walter has changed the implementation of AAs, and the relative ordering of keys has changed. The contents of the arrays involved in the failure seems to be equal, so the bug is in the AA comparison operator.

(I think what happens is that now the exact ordering of
> elements depends on history, i.e. the order in which they were inserted. In the previous implementation the ordering was history-independent.)

Andrei

On 03/22/2010 08:58 AM, Don Clugston
> wrote:
> It seems that one of the druntime commits after 270
> 
> (probably 271, "reduce memory consumption of small AA's") has broken
> the
> Phobos unittests. json.d is now failing.
> 
> _______________________________________________
> phobos mailing
> list
> 
> href="mailto:phobos at puremagic.com">phobos at puremagic.com
> 
> http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________
phobos
> mailing list

> href="mailto:phobos at puremagic.com">phobos at puremagic.com

> href="http://lists.puremagic.com/mailman/listinfo/phobos" target=_blank
> >http://lists.puremagic.com/mailman/listinfo/phobos



March 22, 2010
Exactly. So I think the AA implementation is the culprit.

Andrei

On 03/22/2010 09:55 AM, Steve Schveighoffer wrote:
> Any code that relies on AA's storing keys in the same order is broken.  A rehash can reorder keys at any time, I think even with the old implementation.
>
> -Steve
>
>
>
> ----- Original Message ----
>> From: Andrei Alexandrescu<andrei at erdani.com>
>> To: Discuss the phobos library for D<phobos at puremagic.com>
>> Sent: Mon, March 22, 2010 10:45:11 AM
>> Subject: Re: [phobos] Unit tests broken again. Bad AAs?
>>
>> Yes, I saw that too. Walter has changed the implementation of AAs, and the
>> relative ordering of keys has changed. The contents of the arrays involved in
>> the failure seems to be equal, so the bug is in the AA comparison
>> operator.
>
> (I think what happens is that now the exact ordering of
>> elements depends on history, i.e. the order in which they were inserted. In the
>> previous implementation the ordering was
>> history-independent.)
>
> Andrei
>
> On 03/22/2010 08:58 AM, Don Clugston
>> wrote:
>> It seems that one of the druntime commits after 270
>>
>> (probably 271, "reduce memory consumption of small AA's") has broken
>> the
>> Phobos unittests. json.d is now failing.
>>
>> _______________________________________________
>> phobos mailing
>> list
>>
>> href="mailto:phobos at puremagic.com">phobos at puremagic.com
>>
>> http://lists.puremagic.com/mailman/listinfo/phobos
> _______________________________________________
> phobos
>> mailing list
>
>> href="mailto:phobos at puremagic.com">phobos at puremagic.com
>
>> href="http://lists.puremagic.com/mailman/listinfo/phobos" target=_blank
>>> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos