java-1.8.0-openjdk/java-1.8.0-openjdk-PStack-808293.patch
Jiri Vanek f3b229270b updated to security u45
- removed patch6: disable-doclint-by-default.patch
- added patch d318d83c4e74.patch
- added  rhbz1206656_fix_current_stack_pointer.patch
- renamed PStack-808293.patch -> java-1.8.0-openjdk-PStack-808293.patch
- renamed remove-intree-libraries.sh -> java-1.8.0-openjdk-remove-intree-libraries.sh
- renamed to preven conflix with jdk7
2015-04-15 09:11:21 +02:00

41 lines
1.7 KiB
Diff

--- jdk8/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:33.322164601 +0200
+++ jdk8/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/PStack.java 2012-04-06 02:26:57.958514071 +0200
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Red Hat Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -84,7 +85,8 @@
out.print("----------------- ");
out.print(th);
out.println(" -----------------");
- while (f != null) {
+ int maxStack = 256;
+ while (f != null && maxStack-- > 0) {
ClosestSymbol sym = f.closestSymbolToPC();
Address pc = f.pc();
out.print(pc + "\t");
@@ -158,10 +160,19 @@
}
}
}
+ Address oldPC = f.pc();
+ Address oldFP = f.localVariableBase();
f = f.sender(th);
+ if (f != null
+ && oldPC.equals(f.pc())
+ && oldFP.equals(f.localVariableBase())) {
+ // We didn't make any progress
+ f = null;
+ }
}
} catch (Exception exp) {
- exp.printStackTrace();
+ // exp.printStackTrace();
+ out.println("bad stack: " + exp);
// continue, may be we can do a better job for other threads
}
if (concurrentLocks) {