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

@ -148,6 +148,17 @@ typedef unsigned int uintptr_t;
#endif
#endif
// On solaris 8, UINTPTR_MAX is defined as empty.
// Everywhere else it's an actual value.
#if UINTPTR_MAX - 1 == -1
#undef UINTPTR_MAX
#ifdef _LP64
#define UINTPTR_MAX UINT64_MAX
#else
#define UINTPTR_MAX UINT32_MAX
#endif /* ifdef _LP64 */
#endif
// Additional Java basic types
typedef unsigned char jubyte;