-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b127
-
generic
-
windows
We need a simplified version of the following patch to log the last few entries of the "phe" structure. This information is useful in conclusively identify spurious errors reported by HealWalk/HeapValidate.
=================
static int mallocDebugIntervalCounter = 0;
static int mallocDebugCounter = 0;
bool os::check_heap(bool force) {
+#define SAVE_COUNT 100000
+ static PROCESS_HEAP_ENTRY saved[SAVE_COUNT];
+
if (++mallocDebugCounter < MallocVerifyStart && !force) return true;
if (++mallocDebugIntervalCounter >= MallocVerifyInterval || force) {
// Note: HeapValidate executes two hardware breakpoints when it finds something
@@ -5242,9 +5245,14 @@
// or some other special heap flag has been set that prevents
// locking. We don't try to walk a heap we can't lock.
if (HeapLock(heap) != 0) {
+ memset(saved, 0, sizeof(saved));
PROCESS_HEAP_ENTRY phe;
phe.lpData = NULL;
+ int saved_index = 0;
while (HeapWalk(heap, &phe) != 0) {
+ if (saved_index < SAVE_COUNT) {
+ saved[saved_index++] = phe;
+ }
if ((phe.wFlags & PROCESS_HEAP_ENTRY_BUSY) &&
!HeapValidate(heap, 0, phe.lpData)) {
tty->print_cr("C heap has been corrupted (time: %d allocations)", mallocDebugCounter);
- duplicates
-
JDK-8155522 corrupted C heap with -XX:+UseSHA on TestUseSHA1IntrinsicsOptionOnUnsupportedCPU
-
- Closed
-
-
JDK-8159065 Corrupted c heap with runtime/threads/ThreadInterruptedNotStarted
-
- Closed
-
- relates to
-
JDK-8163146 Remove os::check_heap on Windows
-
- Resolved
-
-
JDK-8163015 Windows os::check_heap() fails with fatal error: corrupted C heap
-
- Closed
-
-
JDK-8146263 tools/pack200/Pack200Test.java failed intermittently with "Unexpected exit from test [exit code: -1073740940]"
-
- Closed
-
-
JDK-8147481 VM crash fatal error: corrupted C heap (runtime.threads.Threads2a.Threads2a)
-
- Closed
-