[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-patches
Subject:    [Mono-patches] r47864 - trunk/mono/mono/mini
From:       "Zoltan Varga (vargaz AT freemail.hu)" <zoltan () mono-cvs ! ximian ! com>
Date:       2005-07-30 19:39:52
Message-ID: 20050730193952.7F4839472C () mono-cvs ! ximian ! com
[Download RAW message or body]

Author: zoltan
Date: 2005-07-30 15:39:51 -0400 (Sat, 30 Jul 2005)
New Revision: 47864

Modified:
   trunk/mono/mono/mini/ChangeLog
   trunk/mono/mono/mini/mini-ia64.c
Log:
2005-07-30  Zoltan Varga  <vargaz@freemail.hu>

	* mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.


Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog	2005-07-30 18:46:54 UTC (rev 47863)
+++ trunk/mono/mono/mini/ChangeLog	2005-07-30 19:39:51 UTC (rev 47864)
@@ -1,5 +1,7 @@
 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
 
+	* mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
+
 	* mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
 
 	* mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.

Modified: trunk/mono/mono/mini/mini-ia64.c
===================================================================
--- trunk/mono/mono/mini/mini-ia64.c	2005-07-30 18:46:54 UTC (rev 47863)
+++ trunk/mono/mono/mini/mini-ia64.c	2005-07-30 19:39:51 UTC (rev 47864)
@@ -956,13 +956,16 @@
 				else
 				if (sig->pinvoke)
 					size = mono_type_native_stack_size (&in->klass->byval_arg, &align);
-				else
-					size = mono_type_stack_size (&in->klass->byval_arg, &align);
+				else {
+					/* 
+					 * Other backends use mono_type_stack_size (), but that
+					 * aligns the size to 8, which is larger than the size of
+					 * the source, leading to reads of invalid memory if the
+					 * source is at the end of address space.
+					 */
+					size = mono_class_value_size (in->klass, &align);
+				}
 
-				/* 
-				 * FIXME: The destination is 'size' long, but the source might
-				 * be smaller.
-				 */
 				if (ainfo->storage == ArgAggregate) {
 					MonoInst *vtaddr, *load, *load2, *offset_ins, *set_reg;
 					int slot;

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic