Strange memory corruption / codegen bug?
safety0ff via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Dec 11 11:06:15 PST 2016
On Sunday, 11 December 2016 at 11:58:39 UTC, ag0aep6g wrote:
>
> Try putting an `assert(childCrossPoint !is otherCrossPoint);`
> before the assignment. If it fails, the variables refer to the
> same node. That would explain how otherCrossPoint.left gets set.
Furthermore, I think he is calling breed on a Tree with itself.
i.e. assert(other !is this) would be a more reliable test since
it won't be subject to randomness.
More information about the Digitalmars-d-learn
mailing list