Mercurial > hg > truffle
diff src/share/vm/utilities/globalDefinitions_visCPP.hpp @ 2307:4a9604cd7c5f
6878713: Verifier heap corruption, relating to backward jsrs
Summary: Added overflow detection in arena Amalloc methods
Reviewed-by: coleenp, phh
author | kamg |
---|---|
date | Wed, 02 Mar 2011 08:18:35 -0500 |
parents | f95d63e2154a |
children | 1d1603768966 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions_visCPP.hpp Wed Mar 02 09:41:26 2011 +0100 +++ b/src/share/vm/utilities/globalDefinitions_visCPP.hpp Wed Mar 02 08:18:35 2011 -0500 @@ -41,6 +41,7 @@ # include <stdio.h> // for va_list # include <time.h> # include <fcntl.h> +# include <limits.h> // Need this on windows to get the math constants (e.g., M_PI). #define _USE_MATH_DEFINES # include <math.h> @@ -99,6 +100,14 @@ typedef signed int ssize_t; #endif +#ifndef UINTPTR_MAX +#ifdef _WIN64 +#define UINTPTR_MAX _UI64_MAX +#else +#define UINTPTR_MAX _UI32_MAX +#endif +#endif + //---------------------------------------------------------------------------------------------------- // Additional Java basic types