changeset 4388:ae05aa9ede7b

7044285: 64 bit VM crashes in Java_sun_java2d_loops_MaskFill_MaskFill Reviewed-by: jgodinez, prr
author bae
date Wed, 20 Jul 2011 16:18:08 +0400
parents 77d5cc943286
children 40d0dea5d0fc
files src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h	Tue Jul 19 14:09:25 2011 -0700
+++ b/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h	Wed Jul 20 16:18:08 2011 +0400
@@ -30,6 +30,8 @@
 extern "C" {
 #endif
 
+#include <stddef.h>
+
 #include "java_awt_AlphaComposite.h"
 
 #include "SurfaceData.h"
@@ -484,7 +486,9 @@
 #define ArraySize(A)    (sizeof(A) / sizeof(A[0]))
 
 #define PtrAddBytes(p, b)               ((void *) (((intptr_t) (p)) + (b)))
-#define PtrCoord(p, x, xinc, y, yinc)   PtrAddBytes(p, (y)*(yinc) + (x)*(xinc))
+#define PtrCoord(p, x, xinc, y, yinc)   PtrAddBytes(p, \
+                                                    ((ptrdiff_t)(y))*(yinc) + \
+                                                    ((ptrdiff_t)(x))*(xinc))
 
 /*
  * The function to call with an array of NativePrimitive structures