[PATCH] 8202414: Unsafe crash in C2

Andy Law 944797358 at qq.com
Tue Sep 11 00:42:27 UTC 2018


Hi Vladimir,

Thank you for your reply:)

However, I think my patch is as below

diff --git a/src/share/vm/opto/memnode.cpp b/src/share/vm/opto/memnode.cpp
--- a/src/share/vm/opto/memnode.cpp
+++ b/src/share/vm/opto/memnode.cpp
@@ -2923,8 +2923,11 @@
     return mem;
   }
 
+  if ((end_offset % BytesPerInt) != 0) {
+    return mem;
+  }
+
   Compile* C = phase->C;
-  assert((end_offset % BytesPerInt) == 0, "odd end offset");
   intptr_t done_offset = end_offset;
   if ((done_offset % BytesPerLong) != 0) {
     done_offset -= BytesPerInt;

Maybe I mis-submitted some code ...?
Sorry for bothering :(

Thanks,
Andy




More information about the hotspot-compiler-dev mailing list