[Mono-bugs] [Bug 29374][Nor] Changed - infinite loop with marshal2.cs

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
25 Aug 2002 16:31:24 -0000


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 gonzalo@ximian.com.

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

--- shadow/29374	Fri Aug 23 14:32:37 2002
+++ shadow/29374.tmp.5410	Sun Aug 25 12:31:24 2002
@@ -40,6 +40,25 @@
 Looks like the same than the test-120.cs crash.  Can you please debug this, I already tried one or two weeks ago and found out that 
 it crashes somewhere inside System.Reflection.Emit but I was unable to find out why.
 
 The crash seems to happen while encoding the attribute, but since I don't have any idea how an attribute is encoded it's very hard 
 for me to know what goes wrong when debugging it.
 
+
+------- Additional Comments From gonzalo@ximian.com  2002-08-25 12:31 -------
+In the for loop (line 641 in TypeBuilder), there is a line that says:
+byte type = data [pos++];
+
+well, displaying byte [] data tells that at the position where it gets
+the length (ie, after that line) we have:
+pos = 9 -> 17
+pos = 10 -> 7
+pos = 11 to 17 -> C h a r S e t
+
+so if you add a 'pos++; after the line #641, mcs is able to compile it
+(because the length of "CharSet" is encoded at pos 10, not 9).
+
+May be the 17 at pos 9 tells where the next parameter information ends???
+
+MS runtime still keeps looping or waiting, but may i hope you find
+this info useful.
+