[Mono-bugs] [Bug 52107][Nor] Changed - System.Reflection fails when JITted
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 18 Dec 2003 07:47:51 -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 piyush.garyali@honeywell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52107
--- shadow/52107 2003-12-17 09:46:54.000000000 -0500
+++ shadow/52107.tmp.21228 2003-12-18 07:47:51.000000000 -0500
@@ -86,6 +86,126 @@
is the topic of another bug report).
------- Additional Comments From lupus@ximian.com 2003-12-17 09:46 -------
The readline bug is fixed in cvs, now.
Forgot to mention that the date is printed incorrectly in this test case
for me (though it works correctly in a standalone test, will investigate).
+
+------- Additional Comments From piyush.garyali@honeywell.com 2003-12-18 07:47 -------
+Well, I was not able to get the test case to work so I broke it down
+into small pieces to get to the problem
+
+[code]
+using System;
+using System.IO;
+using System.Reflection;
+
+public class Invoke
+{
+ public static void Main()
+ {
+ Type t = typeof(TestClass);
+
+ t.InvokeMember("SayHello", BindingFlags.InvokeMethod,
+null, null, new object[] {} );
+ }
+}
+
+public class TestClass
+{
+ public static void SayHello()
+ {
+ Console.WriteLine("Hello");
+ }
+}
+
+After the code is compiled for System.ArgumentException..ctor, I get
+an Access Voilation exception
+
+The assembly code generate is:
+
+??
+mono_jit_compile_method() -> for System.ArgumentException..ctor
+?? (after the code is compiled)
+lwz r8, 0xb0(sp)
+lwz r9, 0xac(sp)
+lwz r10, 0xa8(sp)
+lfd f1, 0x48(sp)
+lfd f2, 0x40(sp)
+lfd f3, 0x38(sp)
+lfd f4, 0x30(sp)
+lfd f5, 0x28(sp)
+lfd f6, 0x20(sp)
+lfd f7, 0x18(sp)
+lfd f8, 0x10(sp)
+lwz sp, 0(sp)
+lwz r31, -4(sp)
+lwz r11, 4(sp)
+mtlr r11
+mtctr r0
+bctr
+ \-> mflr r0
+ stw r0, 4(sp)
+ stw r29, -4(sp)
+ stw r30, -8(sp)
+ stwu sp, -64(sp)
+ stw r3, 0x24(sp)
+ stw r4, 0x28(sp)
+ lwz r3, 0x24(sp)
+ mr r3, r3
+ lwz r4, 0x28(sp)
+ mr r4, r4
+ bl 0x77efe0
+ lwz r0, 0x44(sp)
+ mtlr r0
+ addic sp, sp, 0x40
+ lwz r29, -4(sp)
+ lwz r30, -8(sp)
+ blr
+ \-> lwz r3, 0xbc(sp)
+ mr r3, r3
+ bl start (0x25c730)
+ lwz r3, 0x1f8(sp)
+ ^^^^^^^^^^^^^^^^^^^^^^^
+OS Exception -- Attempt to read protected memory
+ \-> lwz r0, 0(zero)
+
+OS Exception -- Attempt to read protected memory
+
+The register contents are:
+pc 0x00000d00
+sp 0x01764a28
+r0 0x80000000
+r1 0x01764a28
+r2 0x0025f09c
+r3 0x00000033
+r4 0x00000000
+r5 0x00000000
+r6 0x00000000
+r7 0x00000000
+r8 0x00000000
+r9 0x00000000
+r10 0x00000000
+r11 0x00000000
+r12 0x00000000
+r13 0x00000003
+r14 0x01764e58
+r15 0x00002500
+r16 0x00000000
+r17 0x00000000
+r18 0x00000000
+r19 0x00000000
+r20 0x61670000
+r21 0x72452d00
+r22 0x00000000
+r23 0x00000000
+r24 0x008bdbb8
+r25 0x008bdbe0
+r26 0x00000001
+r27 0x00262d00
+r28 0x008bbc68
+r29 0x01764ae8
+r30 0x00000058
+r31 0x6d6f0001
+
+I am working on the 12/17/2003 cvs code.
+