7122219: Passed StringTableSize value not verified

Check that the values specified for -XX:StringTableSize are within a certain range.

Reviewed-by: dholmes, coleenp
This commit is contained in:
Harold Seigel 2012-11-12 15:58:11 -05:00
parent a988fc0968
commit a28380d97e
5 changed files with 19 additions and 10 deletions

View file

@ -576,7 +576,9 @@ void* os::malloc(size_t size, MEMFLAGS memflags, address caller) {
// if NULL is returned the calling functions assume out of memory.
size = 1;
}
if (size > size + space_before + space_after) { // Check for rollover.
return NULL;
}
NOT_PRODUCT(if (MallocVerifyInterval > 0) check_heap());
u_char* ptr = (u_char*)::malloc(size + space_before + space_after);