--- a/jdk/make/test/JtregNative.gmk Mon Mar 13 19:58:52 2017 +0000
+++ b/jdk/make/test/JtregNative.gmk Tue Mar 14 20:53:08 2017 -0400
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -35,12 +35,14 @@
include MakeBase.gmk
include TestFilesCompilation.gmk
+$(eval $(call IncludeCustomExtension, jdk, test/JtregNative.gmk))
+
################################################################################
# Targets for building the native tests themselves.
################################################################################
# Add more directories here when needed.
-BUILD_JDK_JTREG_NATIVE_SRC := \
+BUILD_JDK_JTREG_NATIVE_SRC += \
$(JDK_TOPDIR)/test/native_sanity \
#
--- a/jdk/src/java.base/unix/classes/module-info.java.extra Mon Mar 13 19:58:52 2017 +0000
+++ b/jdk/src/java.base/unix/classes/module-info.java.extra Tue Mar 14 20:53:08 2017 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -32,5 +32,3 @@
exports jdk.internal.module to jdk.internal.vm.compiler;
-// AOT uses jdk.internal.misc.Unsafe
-exports jdk.internal.misc to jdk.aot;
--- a/jdk/src/java.base/windows/classes/module-info.java.extra Mon Mar 13 19:58:52 2017 +0000
+++ b/jdk/src/java.base/windows/classes/module-info.java.extra Tue Mar 14 20:53:08 2017 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -26,3 +26,13 @@
exports sun.security.rsa to jdk.crypto.mscapi;
exports sun.security.internal.spec to jdk.crypto.mscapi;
exports sun.security.util to jdk.crypto.mscapi;
+
+// jdk.internal.vm.compiler uses Unsafe and VM classes from jdk.internal.misc
+exports jdk.internal.misc to jdk.internal.vm.compiler;
+opens jdk.internal.misc to jdk.internal.vm.compiler;
+
+// jdk.internal.vm.compiler uses com.sun.crypto.provider to generate crypto intrinsics
+opens com.sun.crypto.provider to jdk.internal.vm.compiler;
+
+exports jdk.internal.module to jdk.internal.vm.compiler;
+
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/debugLoop.c Mon Mar 13 19:58:52 2017 +0000
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/debugLoop.c Tue Mar 14 20:53:08 2017 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -125,15 +125,13 @@
jboolean replyToSender = JNI_TRUE;
/*
- * For VirtualMachine commands we hold the vmDeathLock
+ * For all commands we hold the vmDeathLock
* while executing and replying to the command. This ensures
- * that a VM command after VM_DEATH will be allowed to complete
+ * that a command after VM_DEATH will be allowed to complete
* before the thread posting the VM_DEATH continues VM
* termination.
*/
- if (cmd->cmdSet == JDWP_COMMAND_SET(VirtualMachine)){
- debugMonitorEnter(vmDeathLock);
- }
+ debugMonitorEnter(vmDeathLock);
/* Initialize the input and output streams */
inStream_init(&in, p);
@@ -172,9 +170,7 @@
/*
* Release the vmDeathLock as the reply has been posted.
*/
- if (cmd->cmdSet == JDWP_COMMAND_SET(VirtualMachine)){
- debugMonitorExit(vmDeathLock);
- }
+ debugMonitorExit(vmDeathLock);
inStream_destroy(&in);
outStream_destroy(&out);
--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventHelper.c Mon Mar 13 19:58:52 2017 +0000
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/eventHelper.c Tue Mar 14 20:53:08 2017 -0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -240,10 +240,10 @@
size = commandSize(command);
/*
- * Immediately close out any commands enqueued from a
- * previously attached debugger.
+ * Immediately close out any commands enqueued from
+ * a dead VM or a previously attached debugger.
*/
- if (command->sessionID != currentSessionID) {
+ if (gdata->vmDead || command->sessionID != currentSessionID) {
log_debugee_location("dequeueCommand(): command session removal", NULL, NULL, 0);
completeCommand(command);
command = NULL;