diff options
author | sgoldman <none@none> | 2008-04-08 12:23:15 -0400 |
---|---|---|
committer | sgoldman <none@none> | 2008-04-08 12:23:15 -0400 |
commit | fc9704a963e1e4535ac01c1adfa971d10c19874b (patch) | |
tree | 8a432d16dc8c47d89e7c600ac5f9c5564fb02777 /src/share/vm/code | |
parent | 8d92dcebf15886dc6e913c9fdfd67eab07807ad7 (diff) | |
download | jdk8u_hotspot-fc9704a963e1e4535ac01c1adfa971d10c19874b.tar.gz |
6603919: Stackwalking crash on x86 -server with Sun Studio's collect -j on
Summary: Rewrite frame::safe_for_sender and friends to be safe for collector/analyzer
Reviewed-by: dcubed, kvn
Diffstat (limited to 'src/share/vm/code')
-rw-r--r-- | src/share/vm/code/codeCache.hpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/share/vm/code/codeCache.hpp b/src/share/vm/code/codeCache.hpp index a46d9202d..3c027641a 100644 --- a/src/share/vm/code/codeCache.hpp +++ b/src/share/vm/code/codeCache.hpp @@ -71,7 +71,22 @@ class CodeCache : AllStatic { // what you are doing) static CodeBlob* find_blob_unsafe(void* start) { CodeBlob* result = (CodeBlob*)_heap->find_start(start); - assert(result == NULL || result->blob_contains((address)start), "found wrong CodeBlob"); + // this assert is too strong because the heap code will return the + // heapblock containing start. That block can often be larger than + // the codeBlob itself. If you look up an address that is within + // the heapblock but not in the codeBlob you will assert. + // + // Most things will not lookup such bad addresses. However + // AsyncGetCallTrace can see intermediate frames and get that kind + // of invalid address and so can a developer using hsfind. + // + // The more correct answer is to return NULL if blob_contains() returns + // false. + // assert(result == NULL || result->blob_contains((address)start), "found wrong CodeBlob"); + + if (result != NULL && !result->blob_contains((address)start)) { + result = NULL; + } return result; } |