-
Bug
-
Resolution: Fixed
-
P4
-
hs25
-
b25
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8011296 | 8 | Ron Durbin | P4 | Closed | Fixed | b84 |
The testMalloc() function is guarded by the MallocMaxTestWords flag:
+ if (MallocMaxTestWords > 0) {
+ ptr = testMalloc(alloc_size);
+ } else {
+ ptr = (u_char*)::malloc(alloc_size);
+ }
so the checks of the MallocMaxTestWords flag in testMalloc() are redundant:
+ if (MallocMaxTestWords > 0 &&
+ (cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) {
+ return NULL;
+ }
+
+ u_char* ptr = (u_char*)::malloc(alloc_size);
+
+ if (MallocMaxTestWords > 0 && (ptr != NULL)) {
+ Atomic::add(((jint) (alloc_size / BytesPerWord)),
+ (volatile jint *) &cur_malloc_words);
+ }
We (the review team) missed this during all the code motion of the
various review rounds.
+ if (MallocMaxTestWords > 0) {
+ ptr = testMalloc(alloc_size);
+ } else {
+ ptr = (u_char*)::malloc(alloc_size);
+ }
so the checks of the MallocMaxTestWords flag in testMalloc() are redundant:
+ if (MallocMaxTestWords > 0 &&
+ (cur_malloc_words + (alloc_size / BytesPerWord)) > MallocMaxTestWords) {
+ return NULL;
+ }
+
+ u_char* ptr = (u_char*)::malloc(alloc_size);
+
+ if (MallocMaxTestWords > 0 && (ptr != NULL)) {
+ Atomic::add(((jint) (alloc_size / BytesPerWord)),
+ (volatile jint *) &cur_malloc_words);
+ }
We (the review team) missed this during all the code motion of the
various review rounds.
- backported by
-
JDK-8011296 checking MallocMaxTestWords in testMalloc() function is redundant
-
- Closed
-
- relates to
-
JDK-7030610 runtime/6878713/Test6878713.sh fails Error. failed to clean up files after test
-
- Closed
-