Merge
authorjwilhelm
Thu, 22 Dec 2016 22:10:02 +0100
changeset 42857 b37629ea3943
parent 42849 fa0a0a987432 (current diff)
parent 42856 d8775521c2ef (diff)
child 42858 670162543c5d
child 43390 0a176b0dd6f0
Merge
common/autoconf/generated-configure.sh
--- a/common/autoconf/hotspot.m4	Wed Dec 21 17:53:11 2016 +0100
+++ b/common/autoconf/hotspot.m4	Thu Dec 22 22:10:02 2016 +0100
@@ -481,7 +481,7 @@
     AC_MSG_RESULT([no, forced])
     BUILD_GTEST="false"
   elif test "x$enable_hotspot_gtest" = "x"; then
-    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
+    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
       AC_MSG_RESULT([yes])
       BUILD_GTEST="true"
     else
--- a/make/common/NativeCompilation.gmk	Wed Dec 21 17:53:11 2016 +0100
+++ b/make/common/NativeCompilation.gmk	Thu Dec 22 22:10:02 2016 +0100
@@ -371,7 +371,8 @@
 #       when compiling C code
 #   DISABLED_WARNINGS_CXX_<toolchain> Disable the given warnings for the specified
 #       toolchain when compiling C++ code
-#   STRIP_SYMBOLS Set to true to strip the final binary if the toolchain allows for it
+#   STRIP_SYMBOLS Set to false to override global strip policy and always leave
+#       symbols in the binary, if the toolchain allows for it
 #   DEBUG_SYMBOLS Set to false to disable generation of debug symbols
 #   COPY_DEBUG_SYMBOLS Set to false to override global setting of debug symbol copying
 #   ZIP_EXTERNAL_DEBUG_SYMBOLS Set to false to override global setting of debug symbol
@@ -886,6 +887,10 @@
     endif # $1_DEBUG_SYMBOLS != false
   endif # COPY_DEBUG_SYMBOLS
 
+  # Unless specifically set, stripping should only happen if symbols are also
+  # being copied.
+  $$(call SetIfEmpty, $1_STRIP_SYMBOLS, $$($1_COPY_DEBUG_SYMBOLS))
+
   ifneq ($$($1_STRIP_SYMBOLS), false)
     ifneq ($$($1_STRIP), )
       # Default to using the global STRIPFLAGS. Allow for overriding with an empty value
--- a/test/lib/jdk/test/lib/hprof/parser/HprofReader.java	Wed Dec 21 17:53:11 2016 +0100
+++ b/test/lib/jdk/test/lib/hprof/parser/HprofReader.java	Thu Dec 22 22:10:02 2016 +0100
@@ -151,6 +151,10 @@
 
     private Snapshot snapshot;
 
+    public static boolean verifyMagicNumber(int numberRead) {
+        return (numberRead == MAGIC_NUMBER);
+    }
+
     public HprofReader(String fileName, PositionDataInputStream in,
                        int dumpNumber, boolean callStack, int debugLevel)
                        throws IOException {
@@ -737,6 +741,12 @@
         long id = readID();
         StackTrace stackTrace = getStackTraceFromSerial(in.readInt());
         long classID = readID();
+        JavaClass searchedClass = snapshot.findClass(
+                                  "0x" + Long.toHexString(classID));
+        if (searchedClass == null) {
+            throw new IOException(
+                "Class Record for 0x" + Long.toHexString(classID) + " not found");
+        }
         int bytesFollowing = in.readInt();
         int bytesRead = (2 * identifierSize) + 8 + bytesFollowing;
         JavaObject jobj = new JavaObject(classID, start);