changeset 9064:2695509c59f8

Merge
author andrew
date Thu, 17 Oct 2019 13:48:07 +0100
parents 7d5c800dae75 b44df6c5942c
children eee5798e1b28
files .hgtags
diffstat 4 files changed, 50 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Sep 10 19:58:22 2019 +0200
+++ b/.hgtags	Thu Oct 17 13:48:07 2019 +0100
@@ -1280,3 +1280,8 @@
 921c5ee7965fdfde75f578ddda24d5cd16f124dc jdk8u232-b04
 b13d7942036329f64c77a93cffc25e1b52523a3c jdk8u232-b05
 760b28d871785cd508239a5f635cfb45451f9202 jdk8u242-b00
+fea2c7f50ce8e6aee1e946eaec7b834193747d82 jdk8u232-b06
+c751303497d539aa85c6373aa0fa85580d3f3044 jdk8u232-b07
+4170228e11e6313e948e6ddcae9af3eed06b1fbe jdk8u232-b08
+12177d88b89c12c14daa5ad681030d7551e8a5a0 jdk8u232-b09
+12177d88b89c12c14daa5ad681030d7551e8a5a0 jdk8u232-ga
--- a/THIRD_PARTY_README	Tue Sep 10 19:58:22 2019 +0200
+++ b/THIRD_PARTY_README	Thu Oct 17 13:48:07 2019 +0100
@@ -2130,13 +2130,13 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1,
+%% This notice is provided with respect to PC/SC Lite v1.8.24,
 which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris.
 
 --- begin of LICENSE ---
 
-Copyright (c) 1999-2004 David Corcoran <corcoran@linuxnet.com>
-Copyright (c) 1999-2004 Ludovic Rousseau <ludovic.rousseau (at) free.fr>
+Copyright (c) 1999-2003 David Corcoran <corcoran@linuxnet.com>
+Copyright (c) 2001-2011 Ludovic Rousseau <ludovic.rousseau@free.fr>
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -2148,15 +2148,10 @@
 2. Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
-3. All advertising materials mentioning features or use of this software
-   must display the following acknowledgement:
-     This product includes software developed by: 
-      David Corcoran <corcoran@linuxnet.com>
-      http://www.linuxnet.com (MUSCLE)
-4. The name of the author may not be used to endorse or promote products
+3. The name of the author may not be used to endorse or promote products
    derived from this software without specific prior written permission.
 
-Changes to this license can be made only by the copyright author with 
+Changes to this license can be made only by the copyright author with
 explicit written consent.
 
 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
--- a/agent/src/os/linux/ps_proc.c	Tue Sep 10 19:58:22 2019 +0200
+++ b/agent/src/os/linux/ps_proc.c	Thu Oct 17 13:48:07 2019 +0100
@@ -345,7 +345,7 @@
 
 static bool read_lib_info(struct ps_prochandle* ph) {
   char fname[32];
-  char buf[256];
+  char buf[PATH_MAX];
   FILE *fp = NULL;
 
   sprintf(fname, "/proc/%d/maps", ph->pid);
@@ -355,10 +355,41 @@
     return false;
   }
 
-  while(fgets_no_cr(buf, 256, fp)){
-    char * word[6];
-    int nwords = split_n_str(buf, 6, word, ' ', '\0');
-    if (nwords > 5 && find_lib(ph, word[5]) == false) {
+  while(fgets_no_cr(buf, PATH_MAX, fp)){
+    char * word[7];
+    int nwords = split_n_str(buf, 7, word, ' ', '\0');
+
+    if (nwords < 6) {
+      // not a shared library entry. ignore.
+      continue;
+    }
+
+    // SA does not handle the lines with patterns:
+    //   "[stack]", "[heap]", "[vdso]", "[vsyscall]", etc.
+    if (word[5][0] == '[') {
+        // not a shared library entry. ignore.
+        continue;
+    }
+
+    if (nwords > 6) {
+      // prelink altered mapfile when the program is running.
+      // Entries like one below have to be skipped
+      //  /lib64/libc-2.15.so (deleted)
+      // SO name in entries like one below have to be stripped.
+      //  /lib64/libpthread-2.15.so.#prelink#.EECVts
+      char *s = strstr(word[5],".#prelink#");
+      if (s == NULL) {
+        // No prelink keyword. skip deleted library
+        print_debug("skip shared object %s deleted by prelink\n", word[5]);
+        continue;
+      }
+
+      // Fall through
+      print_debug("rectifying shared object name %s changed by prelink\n", word[5]);
+      *s = 0;
+    }
+
+    if (find_lib(ph, word[5]) == false) {
        intptr_t base;
        lib_info* lib;
 #ifdef _LP64
--- a/test/runtime/RedefineTests/RedefineDoubleDelete.java	Tue Sep 10 19:58:22 2019 +0200
+++ b/test/runtime/RedefineTests/RedefineDoubleDelete.java	Thu Oct 17 13:48:07 2019 +0100
@@ -24,7 +24,11 @@
 /*
  * @test
  * @bug 8178870
+ * @library /testlibrary
  * @summary Redefine class with CFLH twice to test deleting the cached_class_file
+ * @build RedefineClassHelper
+ * @run main RedefineClassHelper
+ * @run main/othervm -javaagent:redefineagent.jar RedefineDoubleDelete
  */
 
 public class RedefineDoubleDelete {