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
--- 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);
}