[Mono-bugs] [Bug 80190][Nor] New - Problem concerning 64bit pointer
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Fri Dec 8 23:23:40 EST 2006
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 c at tqzh.tk.
http://bugzilla.ximian.com/show_bug.cgi?id=80190
--- shadow/80190 2006-12-08 23:23:40.000000000 -0500
+++ shadow/80190.tmp.28962 2006-12-08 23:23:40.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 80190
+Product: Mono: Runtime
+Version: 1.2
+OS: All
+OS Details: maybe all OS of x64 edition
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: JIT
+AssignedTo: lupus at ximian.com
+ReportedBy: c at tqzh.tk
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Problem concerning 64bit pointer
+
+Description of Problem:
+It's aborted when a certain code concerning the pointer is compiled by VC#
+ and it executed by mono in linux (x64 edition).
+
+
+Steps to reproduce the problem:
+1. Compile the following codes by csc (VisualC# 2005).
+
+// csc.exe /unsafe Test.cs
+public class Test {
+ public static void Main() {
+ unsafe {
+ int n;
+ int* p = &n;
+ *p = 3;
+ }
+ }
+}
+
+2. Execute Test.exe by mono on the Linux of x64 edition.
+
+Actual Results:
+Thrown NullReferenceException.
+
+Expected Results:
+Anything doesn't happen.
+
+How often does this happen?
+Every time.
+
+Additional Information:
+The highest 32 bits were 0
+when calling ' Console.WriteLine("{0:x16}", (long)p); ' before ' *p = 3; .'
+
+IL was as follows.
+
+ .method public hidebysig static void Main() cil managed
+ {
+ .entrypoint
+ .maxstack 2
+ .locals init (int32 V_0,
+ int32* V_1)
+ IL_0000: nop
+ IL_0001: nop
+ IL_0002: ldloca.s V_0
+ IL_0004: conv.u
+ IL_0005: stloc.1
+ IL_0006: ldloc.1
+ IL_0007: ldc.i4.3
+ IL_0008: stind.i4
+ IL_0009: nop
+ IL_000a: ret
+ }
+
+I think that the cause is conv.u of amd64.
+Please correct it.
More information about the mono-bugs
mailing list