[Mono-bugs] [Bug 82827][Maj] New - Wrong function overload taken at runtime

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Sep 12 12:15:08 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by dragon at pksoft.hu.

http://bugzilla.ximian.com/show_bug.cgi?id=82827

--- shadow/82827	2007-09-12 12:15:08.000000000 -0400
+++ shadow/82827.tmp.25977	2007-09-12 12:15:08.000000000 -0400
@@ -0,0 +1,49 @@
+Bug#: 82827
+Product: Mono: Runtime
+Version: 1.2
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: dragon at pksoft.hu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Wrong function overload taken at runtime
+
+Description of Problem:
+Under some circumstances, the wrong overload of an overloaded method gets
+called at runtime.
+
+Steps to reproduce the problem:
+To reproduce this is something hard. I'm currently trying to put together
+the smallest application that reproduces the bug, but in most cases
+everything is okay. However, most especially with very large projects, the
+problem is apparent and does occur. One thing the overloaded methods have
+in common is that they all have an overload where an overloaded parameter
+takes a System.Object. This is then the overload that gets called instead
+of the right one. But I did not confirm whether only "object-overloads" are
+affected or not.
+
+For example the function...
+
+Tao.OpenGl.Gl.glTexImage2D(Int32 target, Int32 level, Int32 internalformat,
+Int32 width, Int32 height, Int32 border, Int32 format, Int32 type,
+System.Object pixels)
+
+...has another overload where the last parameter takes an IntPtr instead of
+an Object. Although I am passing an IntPtr, the object overload is taken at
+runtime. This however only happens under some circumstances that I wasn't
+able to determine until now.
+
+How often does this happen? 
+Rarely? Only a small percent of the projects seem to be affected, but with
+an appropriate application the bug can be reproduced reliably.
+
+The bug can be found both in Mono 1.2.4 and 1.2.5. All affected
+applications work wihout problems on MS .Net.


More information about the mono-bugs mailing list