1.1 --- a/src/share/vm/code/codeCache.hpp Mon Apr 07 15:15:16 2008 -0700 1.2 +++ b/src/share/vm/code/codeCache.hpp Tue Apr 08 12:23:15 2008 -0400 1.3 @@ -71,7 +71,22 @@ 1.4 // what you are doing) 1.5 static CodeBlob* find_blob_unsafe(void* start) { 1.6 CodeBlob* result = (CodeBlob*)_heap->find_start(start); 1.7 - assert(result == NULL || result->blob_contains((address)start), "found wrong CodeBlob"); 1.8 + // this assert is too strong because the heap code will return the 1.9 + // heapblock containing start. That block can often be larger than 1.10 + // the codeBlob itself. If you look up an address that is within 1.11 + // the heapblock but not in the codeBlob you will assert. 1.12 + // 1.13 + // Most things will not lookup such bad addresses. However 1.14 + // AsyncGetCallTrace can see intermediate frames and get that kind 1.15 + // of invalid address and so can a developer using hsfind. 1.16 + // 1.17 + // The more correct answer is to return NULL if blob_contains() returns 1.18 + // false. 1.19 + // assert(result == NULL || result->blob_contains((address)start), "found wrong CodeBlob"); 1.20 + 1.21 + if (result != NULL && !result->blob_contains((address)start)) { 1.22 + result = NULL; 1.23 + } 1.24 return result; 1.25 } 1.26