8226878: zero crashes after JDK-8191278
authoraoqi
Fri, 28 Jun 2019 18:01:36 +0200
changeset 55523 52ef2c940423
parent 55522 b2cbe2f674f0
child 55524 b279ae9843b8
8226878: zero crashes after JDK-8191278 Reviewed-by: shade, jcm
src/hotspot/cpu/zero/stubGenerator_zero.cpp
--- a/src/hotspot/cpu/zero/stubGenerator_zero.cpp	Fri Jun 28 15:58:10 2019 +0100
+++ b/src/hotspot/cpu/zero/stubGenerator_zero.cpp	Fri Jun 28 18:01:36 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2010, 2015 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -156,9 +156,11 @@
     StubRoutines::_oop_arraycopy             = ShouldNotCallThisStub();
 
     StubRoutines::_checkcast_arraycopy       = ShouldNotCallThisStub();
-    StubRoutines::_unsafe_arraycopy          = ShouldNotCallThisStub();
     StubRoutines::_generic_arraycopy         = ShouldNotCallThisStub();
 
+    // Shared code tests for "NULL" to discover the stub is not generated.
+    StubRoutines::_unsafe_arraycopy          = NULL;
+
     // We don't generate specialized code for HeapWord-aligned source
     // arrays, so just use the code we've already generated
     StubRoutines::_arrayof_jbyte_disjoint_arraycopy =