8062870: src/share/vm/services/mallocTracker.hpp:64 assert(_count > 0) failed: Negative counter

Signed bitfield size y can only have (1 << y)-1 values.

Reviewed-by: shade, dholmes, jrose, ctornqvi, gtriantafill
This commit is contained in:
Coleen Phillimore 2014-11-11 09:59:50 -05:00
parent fb8f27e2af
commit d6de951947
3 changed files with 4 additions and 6 deletions

View File

@ -243,15 +243,15 @@ class MallocHeader VALUE_OBJ_CLASS_SPEC {
size_t _flags : 8;
size_t _pos_idx : 16;
size_t _bucket_idx: 40;
#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)1 << 40)
#define MAX_BUCKET_LENGTH ((size_t)(1 << 16))
#define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(40)
#define MAX_BUCKET_LENGTH right_n_bits(16)
#else
size_t _size : 32;
size_t _flags : 8;
size_t _pos_idx : 8;
size_t _bucket_idx: 16;
#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)(1 << 16))
#define MAX_BUCKET_LENGTH ((size_t)(1 << 8))
#define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(16)
#define MAX_BUCKET_LENGTH right_n_bits(8)
#endif // _LP64
public:

View File

@ -27,7 +27,6 @@
* @requires sun.arch.data.model == "32"
* @key nmt jcmd stress
* @library /testlibrary /testlibrary/whitebox
* @ignore 8062870
* @build MallocSiteHashOverflow
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocSiteHashOverflow

View File

@ -27,7 +27,6 @@
* @summary Test to verify correctness of malloc tracking
* @key nmt jcmd
* @library /testlibrary /testlibrary/whitebox
* @ignore 8058251
* @build MallocTrackingVerify
* @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocTrackingVerify