RFR: 8184337: CodeCache::get_code_cache_containing wrongly asserts that start can not be NULL

Tobias Hartmann tobias.hartmann at oracle.com
Thu Jul 13 12:40:11 UTC 2017


Hi Claes,

looks good to me.

Best regards,
Tobias

On 13.07.2017 14:34, Claes Redestad wrote:
> Hi,
> 
> the assert added in the implementation of get_code_cache_containing
> is wrong, as some tests in nightly have been seen to intermittently fail
> when capturing certain frames. The behavior in product builds is sound
> ((heap*)->contains(NULL) will return false..), so the assert should
> simply be removed.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8184337
> 
> Patch is trivial, see below.
> 
> Thanks!
> 
> /Claes
> 
> diff -r 9c54cd2cdf09 src/share/vm/code/codeCache.cpp
> --- a/src/share/vm/code/codeCache.cpp    Mon Jul 10 23:28:25 2017 +0200
> +++ b/src/share/vm/code/codeCache.cpp    Thu Jul 13 14:29:00 2017 +0200
> @@ -423,7 +423,6 @@
>  }
> 
>  CodeHeap* CodeCache::get_code_heap_containing(void* start) {
> -  assert(start != NULL, "start is null");
>    FOR_ALL_HEAPS(heap) {
>      if ((*heap)->contains(start)) {
>        return *heap;
> 


More information about the hotspot-compiler-dev mailing list