http://bugzilla.novell.com/show_bug.cgi?id=536194


           Summary: Inifite loop in DataSet.Merge() with itself
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.4.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


Description of Problem:
If you invoke DataSet.Merge(DataSet), and if the supplied parameter is the same
instance as the one for which the method is invoked, then the method executed
forever and consumes an infinite amount of memory.


Code to reproduce the problem:
DataTable dataTable = new DataTable("Test");
dataTable.Columns.Add("Test");
dataTable.Rows.Add("Test");
DataSet dataSet = new DataSet("Test");
dataSet.Tables.Add(dataTable);
dataSet.Merge(dataSet); // <-- crashes here

Actual Results:
"dataSet.Merge(dataSet)" executes forever. Memory consumption increases
quickly. It will probably crash as soon as it consumed all available memory and
cannot allocate any more.

Expected Results:
The Microsoft implementation does nothing in this case and returns immediately.
I assume that they have an additional check at the very beginning of the
DataSet.Merge(DataSet) implementation that skips the whole merge process.

How often does this happen? 
Always.

Additional Information:
I assume that this bug occurs on all platforms and all systems. However, I
confirmed it on Ubuntu 9.04 x86 and x64 and on the suseLinux vmware appliance
provided by mono-project.com with mono 2.4.2.3.  

I classified the severity as "critical" because I consider the behavior as s
"Crash" and "Severe Memory leak" I guess that a unit test and fix and is
quickly done.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to