Thread overview
Druntime git HEAD broke array ops
Apr 09
Seb
Apr 09
matheus
April 08
I wasted all day today trying to track down a sudden test suite breakage in one of my major D projects after upgrading to the latest dmd toolchain, and found that the latest druntime broke array operations:

	double[] src = [ 0.5 ];
	double[] dest;
	dest.length = src.length;
	dest[] = -src[];

The expected contents of dest is [ -0.5 ], but the actual result is [ 0.0 ].

	https://issues.dlang.org/show_bug.cgi?id=19796

Git bisect narrowed down the cause to PR #1982 (commit d7b99e91e).


T

-- 
Windows: the ultimate triumph of marketing over technology. -- Adrian von Bidder
April 09
On Tuesday, 9 April 2019 at 04:35:33 UTC, H. S. Teoh wrote:
> I wasted all day today trying to track down a sudden test suite breakage in one of my major D projects after upgrading to the latest dmd toolchain, and found that the latest druntime broke array operations:
>
> 	double[] src = [ 0.5 ];
> 	double[] dest;
> 	dest.length = src.length;
> 	dest[] = -src[];
>
> The expected contents of dest is [ -0.5 ], but the actual result is [ 0.0 ].
>
> 	https://issues.dlang.org/show_bug.cgi?id=19796
>
> Git bisect narrowed down the cause to PR #1982 (commit d7b99e91e).
>
>
> T

Thanks a lot for tracking that down. I'm amazed that all the testsuites didn't catch this.
This should hopefully fix the problem: https://github.com/dlang/druntime/pull/2550

April 09
On Tuesday, 9 April 2019 at 05:28:29 UTC, Seb wrote:
> ...
> This should hopefully fix the problem: https://github.com/dlang/druntime/pull/2550

I was taking a looking over the fix: https://github.com/dlang/druntime/pull/2550/commits/4a79c5f95c3656c3523955b56ba9189c10f8fdb3

And the test case scenario is only one and exactly the problem pointed by H.S. Teoh.

Wouldn't be better to take the change and adding more cases?

For example, what would happen if it were more the one value in the array and some of the values were negative?

I mean wouldn't be the case to expand the test case? Because the way it seems it was narrowed to the exactly problem and tomorrow other problems may appear.

Matheus.