7044285: 64 bit VM crashes in Java_sun_java2d_loops_MaskFill_MaskFill
Reviewed-by: jgodinez, prr
--- a/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Tue Jul 19 14:09:25 2011 -0700
+++ b/jdk/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