8202565: C1 compilation crashes with "assert(is_double_stack() && !is_virtual()) failed: type check"
authorthartmann
Mon, 07 May 2018 08:56:35 +0200
changeset 50026 e81481fea884
parent 50025 caf05d64138f
child 50027 69aadf0c1e69
8202565: C1 compilation crashes with "assert(is_double_stack() && !is_virtual()) failed: type check" Summary: Only eagerly resolving the address into a register if the store is precise. Reviewed-by: roland, eosterlund
src/hotspot/share/gc/shared/c1/modRefBarrierSetC1.cpp
--- a/src/hotspot/share/gc/shared/c1/modRefBarrierSetC1.cpp	Mon May 07 07:44:49 2018 +0530
+++ b/src/hotspot/share/gc/shared/c1/modRefBarrierSetC1.cpp	Mon May 07 08:56:35 2018 +0200
@@ -87,6 +87,9 @@
   DecoratorSet decorators = access.decorators();
   bool needs_patching = (decorators & C1_NEEDS_PATCHING) != 0;
   bool is_write = (decorators & C1_WRITE_ACCESS) != 0;
-  resolve_in_register |= !needs_patching && is_write && access.is_oop();
+  bool on_array = (decorators & IN_HEAP_ARRAY) != 0;
+  bool on_anonymous = (decorators & ON_UNKNOWN_OOP_REF) != 0;
+  bool precise = on_array || on_anonymous;
+  resolve_in_register |= !needs_patching && is_write && access.is_oop() && precise;
   return BarrierSetC1::resolve_address(access, resolve_in_register);
 }