[Mono-bugs] [Bug 52399][Min] New - StackOverflow in Type.GetType(name) with custom TypeResolve

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 6 Jan 2004 10:25:24 -0500 (EST)


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 tiago.lima@vianw.pt.

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

--- shadow/52399	2004-01-06 10:25:24.000000000 -0500
+++ shadow/52399.tmp.21819	2004-01-06 10:25:24.000000000 -0500
@@ -0,0 +1,87 @@
+Bug#: 52399
+Product: Mono/Class Libraries
+Version: unspecified
+OS: unknown
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: Unknown
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: tiago.lima@vianw.pt               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: StackOverflow in Type.GetType(name) with custom TypeResolve
+
+Please fill in this template when reporting a bug, unless you know what you are 
+doing. 
+Description of Problem: Type.GetType(string name) gives a Segmentation fault 
+caused by a StackOverflow when an assembly is dinamicaly loaded. 
+ 
+Steps to reproduce the problem: 
+1.  Compile the file (mcs Loader.cs) 
+2. Run the file (mono Loader.exe). 
+ 
+Actual Results: 
+Segmentation Fault. (due to a StackOverflow...) 
+ 
+Expected Results: 
+It should print: 
+	Exists ok! 
+	Over here! 
+	Does not exist ok! 
+	Over here! 
+	Does not exist ok! 
+ 
+How often does this happen?  
+Always. 
+ 
+Additional Information:
+
+------- Additional Comments From tiago.lima@vianw.pt  2003-12-20 13:53 -------
+Created an attachment (id=6286)
+Loader.cs
+
+
+------- Additional Comments From bmaurer@users.sf.net  2003-12-20 14:38 -------
+Repro'd this on Windows, it works fine.
+
+Not critical at all however. Note the guidelines from Bugzilla:
+
+Critical
+    We should fix and push an update immediately. This will mostly be
+used for security fixes.
+Blocker
+    crashes, loss of data, severe memory leak
+Major
+    A major part of the component is nonfunctional.
+Normal
+    A minor part of the component is nonfunctional.
+Minor
+    The component mostly works, but causes some irritation to users. A
+workaround should usually exist.
+Cosmetic
+    The component works with 100% functionality, but has visible
+typos, etc.
+Wishlist
+     Generally a feature request for functionality the program doesn't
+already have. These can be useful as guides for future product
+improvements.
+
+This falls under the `minor' category (the workaround is pretty clear,
+it is not a common usage pattern).
+
+Thanks for reporting the bug, we do appreciate the help!
+
+------- Additional Comments From tiago.lima@vianw.pt  2003-12-20 16:39 -------
+Apparently the problem is that the type is searched globally instead of  
+being searched only in the assembly. It should be simple, but I think its a  
+design problem....  
+
+------- Additional Comments From tiago.lima@vianw.pt  2004-01-06 10:25 -------
+Found a simple workaround: use Assembly.GetTypes() which returns an
+array with all the types in the assembly. Then "foreach" Type in that
+array find a type with the same name.