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

robbin.ehn robbin.ehn at oracle.com
Thu Jul 13 13:38:44 UTC 2017


Thanks for fixing this so quickly, looks good, ship it now!
/Robbin
-------- Originalmeddelande --------Från: Claes Redestad <claes.redestad at oracle.com> Datum: 2017-07-13  14:34  (GMT+01:00) Till: hotspot compiler <hotspot-compiler-dev at openjdk.java.net>, Daniel Daugherty <daniel.daugherty at oracle.com>, Robbin Ehn <robbin.ehn at oracle.com> Rubrik: RFR: 8184337: CodeCache::get_code_cache_containing wrongly asserts that start can not be NULL 
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;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170713/e8cd0af3/attachment.html>


More information about the hotspot-compiler-dev mailing list