Self containing enumerables cause stack overflow when compared for equality

Bug #491300 reported by Christian Marrocco
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Low
Charlie Poole

Bug Description

I'm upgrading from NUnit framework 2.4.8 to 2.5.2.

Now, a StackOverflowException occurs when calling Assert.AreEqual(object,object,string).
The arguments are actually equal.
The object is IEnumerable and directly contains itself.

Work around: use identity instead of equality comparison.

Using NUnit 2.5.2.

Tags: framework easy

Related branches

Revision history for this message
Charlie Poole (charlie.poole) wrote :

This can be fixed by trying identity first - either for all objects or for ienumerables only.

tags: added: easy
Changed in nunitv2:
status: New → Triaged
importance: Undecided → Low
tags: added: framework
Changed in nunitv2:
assignee: nobody → Charlie Poole (charlie.poole)
milestone: none → 2.5.8
Changed in nunitv2:
status: Triaged → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.