[java-1.7.0-openjdk/f17] Sync with f18

jiri vanek jvanek at fedoraproject.org
Wed May 15 15:38:13 UTC 2013


commit 4749afee24db59bc30bd0f8f064ff45a972caa6f
Author: Jiri Vanek <jvanek at jvanek.redhat>
Date:   Wed May 15 17:38:35 2013 +0200

    Sync with f18

 657854-openjdk7.patch   |   29 ++++++++++
 README.src              |    4 +-
 gstackbounds.patch      |  139 +++++++++++++++++++++++++++++++++++++++++++++++
 java-1.7.0-openjdk.spec |   17 ++++++-
 sources                 |    2 +-
 5 files changed, 187 insertions(+), 4 deletions(-)
---
diff --git a/657854-openjdk7.patch b/657854-openjdk7.patch
new file mode 100644
index 0000000..2f6b2f8
--- /dev/null
+++ b/657854-openjdk7.patch
@@ -0,0 +1,29 @@
+--- openjdk/jdk/src/share/native/sun/font/freetypeScaler.c
++++ openjdk/jdk/src/share/native/sun/font/freetypeScaler.c
+@@ -488,14 +488,15 @@
+ 
+     /**** Note: only some metrics are affected by styling ***/
+ 
++#define FT_MulFixFloatShift6(a, b) (((float) (a)) * ((float) (b)) / 65536.0 / 64.0)
+     /* ascent */
+     ax = 0;
+-    ay = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
++    ay = -(jfloat) (FT_MulFixFloatShift6(
+                        ((jlong) scalerInfo->face->ascender + bmodifier/2),
+                        (jlong) scalerInfo->face->size->metrics.y_scale));
+     /* descent */
+     dx = 0;
+-    dy = -(jfloat) FT26Dot6ToFloat(FT_MulFix(
++    dy = -(jfloat) (FT_MulFixFloatShift6(
+                        ((jlong) scalerInfo->face->descender + bmodifier/2),
+                        (jlong) scalerInfo->face->size->metrics.y_scale));
+     /* baseline */
+@@ -503,7 +504,7 @@
+ 
+     /* leading */
+     lx = 0;
+-    ly = (jfloat) FT26Dot6ToFloat(FT_MulFix(
++    ly = (jfloat) (FT_MulFixFloatShift6(
+                       (jlong) scalerInfo->face->height + bmodifier,
+                       (jlong) scalerInfo->face->size->metrics.y_scale))
+                   + ay - dy;
diff --git a/README.src b/README.src
index eef0423..7a54b1b 100644
--- a/README.src
+++ b/README.src
@@ -1,2 +1,2 @@
-The java-1.6.0-openjdk-src subpackage contains the complete IcedTea
-class library source code for use by IDE indexers and debuggers.
+The java-1.7.0-openjdk-src subpackage contains the complete class library
+source code for use by IDE indexers and debuggers.
diff --git a/gstackbounds.patch b/gstackbounds.patch
new file mode 100644
index 0000000..a579dcd
--- /dev/null
+++ b/gstackbounds.patch
@@ -0,0 +1,139 @@
+diff --git a/src/os/linux/vm/os_linux.cpp b/src/os/linux/vm/os_linux.cpp
+--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp
++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -2763,39 +2763,47 @@
+ // writing thread stacks don't use growable mappings (i.e. those
+ // creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this
+ // only applies to the main thread.
+-
+-static
+-bool get_stack_bounds(uintptr_t *bottom, uintptr_t *top) {
+-
+-  char buf[128];
+-  int fd, sz;
+-
+-  if ((fd = ::open("/proc/self/maps", O_RDONLY)) < 0) {
++static bool
++get_stack_bounds(uintptr_t *bottom, uintptr_t *top)
++{
++  FILE *f = fopen("/proc/self/maps", "r");
++  if (f == NULL)
+     return false;
+-  }
+-
+-  const char kw[] = "[stack]";
+-  const int kwlen = sizeof(kw)-1;
+-
+-  // Address part of /proc/self/maps couldn't be more than 128 bytes
+-  while ((sz = os::get_line_chars(fd, buf, sizeof(buf))) > 0) {
+-     if (sz > kwlen && ::memcmp(buf+sz-kwlen, kw, kwlen) == 0) {
+-        // Extract addresses
+-        if (sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
+-           uintptr_t sp = (uintptr_t) __builtin_frame_address(0);
+-           if (sp >= *bottom && sp <= *top) {
+-              ::close(fd);
+-              return true;
+-           }
++
++  while (!feof(f)) {
++    size_t dummy;
++    char *str = NULL;
++    ssize_t len = getline(&str, &dummy, f);
++    if (len == -1) {
++      fclose(f);
++      if (str != NULL)
++	free(str);
++      return false;
++    }
++
++    if (len > 0 && str[len-1] == '\n') {
++      str[len-1] = 0;
++      len--;
++    }
++
++    static const char *stack_str = "[stack]";
++    if (len > (ssize_t)strlen(stack_str)
++       && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) {
++      if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
++        uintptr_t sp = (uintptr_t)__builtin_frame_address(0);
++        if (sp >= *bottom && sp <= *top) {
++          free(str);
++          fclose(f);
++          return true;
+         }
+-     }
+-  }
+-
+- ::close(fd);
++      }
++    }
++    free(str);
++  }
++  fclose(f);
+   return false;
+ }
+ 
+-
+ // If the (growable) stack mapping already extends beyond the point
+ // where we're going to put our guard pages, truncate the mapping at
+ // that point by munmap()ping it.  This ensures that when we later
+diff --git a/src/share/vm/runtime/os.cpp b/src/share/vm/runtime/os.cpp
+--- openjdk/hotspot/src/share/vm/runtime/os.cpp
++++ openjdk/hotspot/src/share/vm/runtime/os.cpp
+@@ -1331,41 +1331,3 @@
+   }
+   return result;
+ }
+-
+-// Read file line by line, if line is longer than bsize,
+-// skip rest of line.
+-int os::get_line_chars(int fd, char* buf, const size_t bsize){
+-  size_t sz, i = 0;
+-
+-  // read until EOF, EOL or buf is full
+-  while ((sz = (int) read(fd, &buf[i], 1)) == 1 && i < (bsize-2) && buf[i] != '\n') {
+-     ++i;
+-  }
+-
+-  if (buf[i] == '\n') {
+-    // EOL reached so ignore EOL character and return
+-
+-    buf[i] = 0;
+-    return (int) i;
+-  }
+-
+-  buf[i+1] = 0;
+-
+-  if (sz != 1) {
+-    // EOF reached. if we read chars before EOF return them and
+-    // return EOF on next call otherwise return EOF
+-
+-    return (i == 0) ? -1 : (int) i;
+-  }
+-
+-  // line is longer than size of buf, skip to EOL
+-  char ch;
+-  while (read(fd, &ch, 1) == 1 && ch != '\n') {
+-    // Do nothing
+-  }
+-
+-  // return initial part of line that fits in buf.
+-  // If we reached EOF, it will be returned on next call.
+-
+-  return (int) i;
+-}
+diff --git a/src/share/vm/runtime/os.hpp b/src/share/vm/runtime/os.hpp
+--- openjdk/hotspot/src/share/vm/runtime/os.hpp
++++ openjdk/hotspot/src/share/vm/runtime/os.hpp
+@@ -672,10 +672,6 @@
+   // Hook for os specific jvm options that we don't want to abort on seeing
+   static bool obsolete_option(const JavaVMOption *option);
+ 
+-  // Read file line by line. If line is longer than bsize,
+-  // rest of line is skipped. Returns number of bytes read or -1 on EOF
+-  static int get_line_chars(int fd, char *buf, const size_t bsize);
+-
+   // Extensions
+ #include "runtime/os_ext.hpp"
+ 
+
diff --git a/java-1.7.0-openjdk.spec b/java-1.7.0-openjdk.spec
index 5e80114..fe16f76 100644
--- a/java-1.7.0-openjdk.spec
+++ b/java-1.7.0-openjdk.spec
@@ -149,7 +149,7 @@
 
 Name:    java-%{javaver}-%{origin}
 Version: %{javaver}.%{buildver}
-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
@@ -403,6 +403,12 @@ Patch302: systemtap.patch
 # Rhino support
 Patch400: rhino-icedtea-2.1.1.patch
 
+#Workaround RH947731
+Patch401: 657854-openjdk7.patch
+#Workaround RH902004
+Patch402: gstackbounds.patch
+# End of tmp patches
+
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: gcc-c++
@@ -726,6 +732,11 @@ patch -l -p0 < %{PATCH104}
 patch -l -p0 < %{PATCH105}
 %endif
 
+patch -l -p0 < %{PATCH401}
+%ifarch %{jit_arches}
+patch -l -p0 < %{PATCH402}
+%endif
+
 # Build the re-written rhino jar
 mkdir -p rhino/{old,new}
 
@@ -1058,6 +1069,7 @@ done
 # Install desktop files.
 install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/{applications,pixmaps}
 for e in jconsole policytool ; do
+    sed -i "s/#ARCH#/%{_arch}/g" $e.desktop
     desktop-file-install --vendor=%{name} --mode=644 \
         --dir=$RPM_BUILD_ROOT%{_datadir}/applications $e.desktop
 done
@@ -1412,6 +1424,9 @@ exit 0
 %doc %{buildoutputdir}/j2sdk-image/jre/LICENSE
 
 %changelog
+* Wed Apr 16 2013 Jiri Vanek <jvanek at redhat.com - 1.7.0.19-2.3.9.4.fc17
+- Sync with f18
+
 * Fri Apr 19 2013 Deepak Bhole <dbhole at redhat.com> - 1.7.0.19-2.3.9.3.fc17
 - Updated 2.1.8 tarball
 
diff --git a/sources b/sources
index c025a32..c8f5629 100644
--- a/sources
+++ b/sources
@@ -1,5 +1,5 @@
 ea344cc5b53b73f375558ba41760ff64  class-rewriter.tar.gz
-7df0a19525f26643d4cea3228fbbc6cc  desktop-files.tar.gz
+200676ae97998b6f5bc18ff77e35d222  desktop-files.tar.gz
 868ff2d4457d1a2dccfa465fb8220e1c  generated-files.tar.gz
 c12f124672a97c7491530fed2c0facdc  java-access-bridge-1.23.0.tar.bz2
 1cb61996cf5dbe80827abbe7d009bf28  pulseaudio.tar.gz


More information about the scm-commits mailing list