6878713: Verifier heap corruption, relating to backward jsrs

Added overflow detection in arena Amalloc methods

Reviewed-by: coleenp, phh
This commit is contained in:
Keith McGuigan 2011-03-02 08:18:35 -05:00
parent 97e74a3862
commit 380d90b364
7 changed files with 114 additions and 2 deletions

View file

@ -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 intptr_t;
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