提交 3fae7243 编写于 作者: C coleenp

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

Summary: Signed bitfield size y can only have (1 << y)-1 values.
Reviewed-by: shade, dholmes, jrose, ctornqvi, gtriantafill
上级 930ff45c
...@@ -243,15 +243,15 @@ class MallocHeader VALUE_OBJ_CLASS_SPEC { ...@@ -243,15 +243,15 @@ class MallocHeader VALUE_OBJ_CLASS_SPEC {
size_t _flags : 8; size_t _flags : 8;
size_t _pos_idx : 16; size_t _pos_idx : 16;
size_t _bucket_idx: 40; size_t _bucket_idx: 40;
#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)1 << 40) #define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(40)
#define MAX_BUCKET_LENGTH ((size_t)(1 << 16)) #define MAX_BUCKET_LENGTH right_n_bits(16)
#else #else
size_t _size : 32; size_t _size : 32;
size_t _flags : 8; size_t _flags : 8;
size_t _pos_idx : 8; size_t _pos_idx : 8;
size_t _bucket_idx: 16; size_t _bucket_idx: 16;
#define MAX_MALLOCSITE_TABLE_SIZE ((size_t)(1 << 16)) #define MAX_MALLOCSITE_TABLE_SIZE right_n_bits(16)
#define MAX_BUCKET_LENGTH ((size_t)(1 << 8)) #define MAX_BUCKET_LENGTH right_n_bits(8)
#endif // _LP64 #endif // _LP64
public: public:
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
* @requires sun.arch.data.model == "32" * @requires sun.arch.data.model == "32"
* @key nmt jcmd stress * @key nmt jcmd stress
* @library /testlibrary /testlibrary/whitebox * @library /testlibrary /testlibrary/whitebox
* @ignore 8062870
* @build MallocSiteHashOverflow * @build MallocSiteHashOverflow
* @run main ClassFileInstaller sun.hotspot.WhiteBox * @run main ClassFileInstaller sun.hotspot.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocSiteHashOverflow * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=detail MallocSiteHashOverflow
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册