[Mono-bugs] [Bug 402053] New: GetComSlotForMethodInfo returns "7" for " IUnknown Interface". When the expected value was "3"

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jun 20 05:17:37 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=402053


           Summary: GetComSlotForMethodInfo returns "7" for "IUnknown
                    Interface". When the expected value was "3"
           Product: Mono: Class Libraries
           Version: 1.9.0
          Platform: 64bit
        OS/Version: Solaris 10
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: avinash.ramesh at wipro.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other


Platform: Mono Built ON Solaris 10 SPARC 64. 

Test case Failure:  GetComSlotForMethodInfo of the “Marshal” class returns
"7" for the "IUnknown Interface". When the expected value was "3"

Analysis:

While analyzing the failure of the
mono-1.9/mcs/class/corlib/System.Runtime.InteropServices/MarshalTest.cs, found
out that

1) Test Case failure at MarshalTest.cs (Line.no 469)

2)  Failure happens while checking whether the “GetComSlotForMethodInfo” of
Marshal Class returns “7” for the “ITestUnknown” interface of type
“IUknown” present in MarshalTest.cs, when the expected result was “3”.

3) While trying to analyze the failure we found out that, the “marshal.c”
present in “mono-1.9/mono/metadata” uses the
“cominterop_get_com_slot_begin “ which returns the slot numbers for members
of interfaces.

4) Here the interface’s attributes is returned by the
“mono_custom_attrs_get_attr” function which is being stored in the
“MonoInterfaceTypeAttribute” variable “itf_attr”.

5) The interface attribute does not return the correct “intType” as
expected for the “IUnknown” interface, resulting in failure to return
“3”.
When we tried executing the test cases on the "Runtime 2.0" it resulted in same
error.

Inference:

While trying to understand things happening, we found out from the “MSDN”
site that the zero-based slot number returned by this method accounts for three
IUnknown and possibly four IDispatch methods, making the value of the first
available slot either 3 or 7.

http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.getcomslotformethodinfo.aspx

Failures:

Failure stack:
1)
MonoTests.System.Runtime.InteropServices.MarshalTest.TestGetComSlotForMethodInfo
: 
        expected:<3>
         but was:<7>
  at
MonoTests.System.Runtime.InteropServices.MarshalTest.TestGetComSlotForMethodInfo
() [0x0005d] in
/softwares/mono-1.9/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs:471 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[])
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x00055] in
/softwares/mono-1.9/mcs/class/corlib/System.Reflection/MonoMethod.cs:149


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list