changeset 41360:241663e51880

8161225: Assert failure in JVMTI GetNamedModule at JPLISAgent.c line: 792 Summary: Made the assert less restrictive. Reviewed-by: dholmes, dcubed, sspitsyn
author cjplummer
date Wed, 21 Sep 2016 12:53:07 -0700
parents 23b0a20c3e3c
children b48cf809a95b 46913f218c6b
files jdk/src/java.instrument/share/native/libinstrument/JPLISAgent.c jdk/test/ProblemList.txt jdk/test/java/lang/instrument/DaemonThread/TestDaemonThreadLauncher.java
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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);
         }
     }
 }