mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
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:
parent
a988fc0968
commit
a28380d97e
5 changed files with 19 additions and 10 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue