Mercurial > hg > graal-compiler
diff src/share/vm/runtime/os.cpp @ 6982:e4f764ddb06a
7122219: Passed StringTableSize value not verified
Summary: Check that the values specified for -XX:StringTableSize are within a certain range.
Reviewed-by: dholmes, coleenp
author | hseigel |
---|---|
date | Mon, 12 Nov 2012 15:58:11 -0500 |
parents | 716c64bda5ba |
children | 80e866b1d053 |
line wrap: on
line diff
--- a/src/share/vm/runtime/os.cpp Fri Nov 09 22:22:53 2012 -0800 +++ b/src/share/vm/runtime/os.cpp Mon Nov 12 15:58:11 2012 -0500 @@ -576,7 +576,9 @@ // 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);