[java-1.7.0-openjdk/f20] Fix jinfo behaviour when prelink cache is present - Resolves: rhbz#1064383
jiri vanek
jvanek at fedoraproject.org
Thu May 22 13:01:41 UTC 2014
commit eb4da55726967a4f09c51086f74ede4454af4230
Author: Jiri Vanek <jvanek at jvanek.redhat>
Date: Thu May 22 15:01:26 2014 +0200
Fix jinfo behaviour when prelink cache is present
- Resolves: rhbz#1064383
java-1.7.0-openjdk.spec | 14 ++++++--
rh1064383-prelink_fix.patch | 79 +++++++++++++++++++++++++++++++++++++++++++
2 files changed, 90 insertions(+), 3 deletions(-)
---
diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index e61c212..f563f6e 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -152,7 +152,7 @@
Name: java-%{javaver}-%{origin}
Version: %{javaver}.60
-Release: %{icedtea_version}.3%{?dist}
+Release: %{icedtea_version}.4%{?dist}
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@@ -270,6 +270,9 @@ Patch403: PStack-808293.patch
Patch412: add-final-location-rpaths.patch
# End of tmp patches
+# Temporary copy of RH1064383 fix; remove after release of 2.4.8
+Patch413: rh1064383-prelink_fix.patch
+
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
@@ -535,6 +538,7 @@ tar xzf %{SOURCE9}
%patch403
%patch412
+%patch413
%build
# How many cpu's do we have?
@@ -1526,12 +1530,16 @@ exit 0
%{_jvmdir}/%{jredir}/lib/accessibility.properties
%changelog
-* Thu May 22 2014 Jiri Vanek <jvanek at redhat.com> - 1.7.0.51-2.4.7.2.el6
+* Thu May 22 2014 Andrew Hughes <gnu.andrew at redhat.com - 1.7.0.51-2.4.7.4.fc20
+- Fix jinfo behaviour when prelink cache is present
+- Resolves: rhbz#1064383
+
+* Thu May 22 2014 Jiri Vanek <jvanek at redhat.com> - 1.7.0.51-2.4.7.3.fc20
- debug turned off (0)
- python added to line %{SOURCE14} $files to preven access denied
- added build requires for python
-* Thu May 22 2014 Jiri Vanek <jvanek at redhat.com> - 1.7.0.51-2.4.7.2.el6
+* Thu May 22 2014 Jiri Vanek <jvanek at redhat.com> - 1.7.0.51-2.4.7.2.fc20
- bumped release
- changed buildoutputdir to contains "-debug" in case of debug on
- rewritten (long unmaintained) java-1.7.0-openjdk-debugdocs.patch and
diff --git a/rh1064383-prelink_fix.patch b/rh1064383-prelink_fix.patch
new file mode 100644
index 0000000..79b8f19
--- /dev/null
+++ b/rh1064383-prelink_fix.patch
@@ -0,0 +1,79 @@
+# HG changeset patch
+# User andrew
+# Date 1400254787 -3600
+# Fri May 16 16:39:47 2014 +0100
+# Node ID ffef4049ab324d5be3caf829b40d49fb3aadea8a
+# Parent 0c479601fd127d70cd414ba0b4e7fb68422e5450
+8038392: Generating prelink cache breaks JAVA 'jinfo' utility normal behavior
+Summary: See RH1064383 (https://bugzilla.redhat.com/show_bug.cgi?id=1064383)
+Contributed-by: Carlos Santos <casantos at redhat.com>
+
+diff -r 0c479601fd12 -r ffef4049ab32 agent/src/os/linux/ps_proc.c
+--- openjdk.orig/hotspot/agent/src/os/linux/ps_proc.c Thu Apr 17 17:20:17 2014 +0100
++++ openjdk/hotspot/agent/src/os/linux/ps_proc.c Fri May 16 16:39:47 2014 +0100
+@@ -261,7 +261,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);
+@@ -271,10 +271,52 @@
+ 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;
++ }
++
++ if (word[5][0] == '[') {
++ // not a shared library entry. ignore.
++ if (strncmp(word[5],"[stack",6) == 0) {
++ continue;
++ }
++ if (strncmp(word[5],"[heap]",6) == 0) {
++ continue;
++ }
++
++ // SA don't handle VDSO
++ if (strncmp(word[5],"[vdso]",6) == 0) {
++ continue;
++ }
++ if (strncmp(word[5],"[vsyscall]",6) == 0) {
++ 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("rectifing 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
More information about the scm-commits
mailing list