8161225: Assert failure in JVMTI GetNamedModule at JPLISAgent.c line: 792
authorcjplummer
Wed, 21 Sep 2016 12:53:07 -0700
changeset 41360 241663e51880
parent 41359 23b0a20c3e3c
child 41361 b48cf809a95b
child 41364 46913f218c6b
8161225: Assert failure in JVMTI GetNamedModule at JPLISAgent.c line: 792 Summary: Made the assert less restrictive. Reviewed-by: dholmes, dcubed, sspitsyn
jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c
jdk/test/ProblemList.txt
jdk/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java
--- a/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c	Wed Sep 21 08:10:48 2016 -0400
+++ b/jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c	Wed Sep 21 12:53:07 2016 -0700
@@ -790,9 +790,10 @@
     pkg_name_buf[len] = '\0';
 
     err = (*jvmti)->GetNamedModule(jvmti, loaderObject, pkg_name_buf, &moduleObject);
+    free((void*)pkg_name_buf);
+    check_phase_ret_blob(err, NULL);
     jplis_assert_msg(err == JVMTI_ERROR_NONE, "error in the JVMTI GetNamedModule");
 
-    free((void*)pkg_name_buf);
     return moduleObject;
 }
 
--- a/jdk/test/ProblemList.txt	Wed Sep 21 08:10:48 2016 -0400
+++ b/jdk/test/ProblemList.txt	Wed Sep 21 12:53:07 2016 -0700
@@ -134,8 +134,6 @@
 
 java/lang/instrument/BootClassPath/BootClassPathTest.sh         8072130 macosx-all
 
-java/lang/instrument/DaemonThread/TestDaemonThread.java         8161225 generic-all
-
 java/lang/management/MemoryMXBean/Pending.java                  8158837 generic-all
 java/lang/management/MemoryMXBean/PendingAllGC.sh               8158760 generic-all
 
--- a/jdk/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java	Wed Sep 21 08:10:48 2016 -0400
+++ b/jdk/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java	Wed Sep 21 12:53:07 2016 -0700
@@ -1,6 +1,6 @@
 /*
  * Copyright 2014 Goldman Sachs.
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, 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,6 +32,7 @@
             ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-javaagent:DummyAgent.jar", "TestDaemonThread", ".");
             OutputAnalyzer analyzer = ProcessTools.executeProcess(pb);
             analyzer.shouldNotContain("ASSERTION FAILED");
+            analyzer.shouldHaveExitValue(0);
         }
     }
 }