/hg/release/icedtea7-forest-2.6/jdk: 8 new changesets

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

/hg/release/icedtea7-forest-2.6/jdk: 8 new changesets

andrew-127
changeset 9a45e850d12d in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=9a45e850d12d
author: sgehwolf
date: Mon Mar 21 11:24:09 2016 +0100

        8153711, PR3315: [REDO] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command
        Summary: Delete global references in invoker_completeInvokeRequest()
        Reviewed-by: sspitsyn, dsamersoff


changeset feb34a6d03ee in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=feb34a6d03ee
author: andrew
date: Tue Jan 24 23:02:54 2017 +0000

        PR3318: Fix compatibility with vanilla Fontconfig
        Contributed-by: Matthias Dahl <[hidden email]>

        With vanilla Fontconfig, most text is not rendered.

        The "Infinality"-patched Fontconfig with its own configuration,
        supplies an additional config file that sets the antialias key
        (FC_ANTIALIAS) which is not part of the vanilla Fontconfig and also
        has no default in its source code.

        In the case that FC_ANTIALIAS is not being provided for a given font
        because the font does not contain the appropriate information (which
        is quite common) or a specific config file is missing,
        FcPatternGetBool for the key will return an error and no valid
        result. Thus, ftRenderMode stays uninitialized due to the way its
        initialized in the conditional constructs, eventually causing the text
        rendering anomaly.

        Furthermore, the logic is flawed as well. The specific subpixel
        rendering modes are only properly set if FC_ANTIALIAS is set and true,
        no matter what was requested by the caller (aaType).

        This patch makes the following changes to address those problems:

        1. ftRenderMode is always properly initialized.

        2. FC_ANTIALIAS is only evaluated if antialiasing was requested and only
           used to turn off antialiasing if that is suggested by Fontconfig.

        3. Subpixel rendering modes are properly set according to Fontconfig
           results and only if subpixel rendering was actually requested.

        In order to properly adjust for the "forced off" antialiasing, it is
        necessary to change the signature of readFontconfig and give it full
        access to FTScalerContext, so it can properly set the new aaType.


changeset 97fe50561c93 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=97fe50561c93
author: andrew
date: Tue Jan 24 23:21:34 2017 +0000

        PR3318: Fix glyph y advance
        Contributed-by: Matthias Dahl <[hidden email]>

        The y advance needs to be negated as the final step, otherwise the
        rounding will naturally be wrong.

        This did show itself for example as shifted into each other glyphs in
        Android Studio for text where a rotation was applied (e.g. scale on
        the ui builder).


changeset 49a475eb9ffd in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=49a475eb9ffd
author: andrew
date: Tue Jan 24 23:41:30 2017 +0000

        PR3318: Always round glyph advance in 26.6 space
        Contributed-by: Matthias Dahl <[hidden email]>

        By rounding in the 26.6 space, the glyph advance can be snapped to the
        next 64 boundary by integer arithmetic alone, thus avoiding floating
        arithmetic and improving accuracy.


changeset 9a7b641574ce in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=9a7b641574ce
author: andrew
date: Wed Jan 25 00:24:10 2017 +0000

        PR3318: Simplify glyph advance handling
        Contributed-by: Matthias Dahl <[hidden email]>

        Reduce the branches and always round and convert the advance, no matter
        if its zero or not since it is guaranteed that 0 divided by a floating
        point always equals zero.


changeset f09b408bbec6 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=f09b408bbec6
author: andrew
date: Mon Feb 06 04:37:12 2017 +0000

        PR3318: Replace 'infinality' with 'improved font rendering'


changeset 296a14de4d24 in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=296a14de4d24
author: andrew
date: Mon Feb 06 20:16:40 2017 +0000

        Bump to icedtea-2.6.9pre01


changeset dd99aac0647c in /hg/release/icedtea7-forest-2.6/jdk
details: http://icedtea.classpath.org/hg/release/icedtea7-forest-2.6/jdk?cmd=changeset;node=dd99aac0647c
author: andrew
date: Mon Feb 06 22:14:33 2017 +0000

        Added tag icedtea-2.6.9pre01 for changeset 296a14de4d24


diffstat:

 .hgtags                                    |    1 +
 make/jdk_generic_profile.sh                |    2 +-
 make/sun/font/Makefile                     |    6 +-
 src/share/back/invoker.c                   |   94 ++++++-
 src/share/native/sun/font/freetypeScaler.c |  121 ++++---
 test/com/sun/jdi/oom/@debuggeeVMOptions    |    1 +
 test/com/sun/jdi/oom/OomDebugTest.java     |  417 +++++++++++++++++++++++++++++
 test/com/sun/jdi/oom/OomDebugTestSetup.sh  |   46 +++
 8 files changed, 624 insertions(+), 64 deletions(-)

diffs (truncated from 939 to 500 lines):

diff -r e4495735dfea -r dd99aac0647c .hgtags
--- a/.hgtags Mon Nov 14 06:34:37 2016 +0000
+++ b/.hgtags Mon Feb 06 22:14:33 2017 +0000
@@ -650,3 +650,4 @@
 0819886b3679a520ed54cf9fb0e437d1cc4175cf icedtea-2.6.8pre01
 c16fb4099a2bafe701d533d9a0fd869e7f8e5408 jdk7u121-b00
 52225839bbeac30981e09753827d2fa92202386e icedtea-2.6.8
+296a14de4d24c06fe768e7ee99eb41563ed13e62 icedtea-2.6.9pre01
diff -r e4495735dfea -r dd99aac0647c make/jdk_generic_profile.sh
--- a/make/jdk_generic_profile.sh Mon Nov 14 06:34:37 2016 +0000
+++ b/make/jdk_generic_profile.sh Mon Feb 06 22:14:33 2017 +0000
@@ -671,7 +671,7 @@
 
 # IcedTea versioning
 export ICEDTEA_NAME="IcedTea"
-export PACKAGE_VERSION="2.6.8"
+export PACKAGE_VERSION="2.6.9pre01"
 export DERIVATIVE_ID="${ICEDTEA_NAME} ${PACKAGE_VERSION}"
 echo "Building ${DERIVATIVE_ID}"
 
diff -r e4495735dfea -r dd99aac0647c make/sun/font/Makefile
--- a/make/sun/font/Makefile Mon Nov 14 06:34:37 2016 +0000
+++ b/make/sun/font/Makefile Mon Feb 06 22:14:33 2017 +0000
@@ -113,8 +113,8 @@
 endif
 
 # Turn on infinality rendering support when requested
-ifeq ($(INFINALITY_SUPPORT),true)
-  OTHER_CFLAGS += $(FONTCONFIG_CFLAGS) -DINFINALITY
+ifeq ($(IMPROVED_FONT_RENDERING),true)
+  OTHER_CFLAGS += $(FONTCONFIG_CFLAGS) -DIMPROVED_FONT_RENDERING
 endif
 
 #In the non-OpenJDK mode we need to build T2K
@@ -158,7 +158,7 @@
   OTHER_LDLIBS += -L$(FREETYPE_LIB_PATH) $(FT2_LIBS)
 endif
 
-ifeq ($(INFINALITY_SUPPORT),true)
+ifeq ($(IMPROVED_FONT_RENDERING),true)
 OTHER_LDLIBS += $(FONTCONFIG_LIBS)
 endif
 
diff -r e4495735dfea -r dd99aac0647c src/share/back/invoker.c
--- a/src/share/back/invoker.c Mon Nov 14 06:34:37 2016 +0000
+++ b/src/share/back/invoker.c Mon Feb 06 22:14:33 2017 +0000
@@ -211,6 +211,62 @@
     return error;
 }
 
+/*
+ * Delete saved global references - if any - for:
+ * - a potentially thrown Exception
+ * - a returned refernce/array value
+ * See invoker_doInvoke() and invoke* methods where global references
+ * are being saved.
+ */
+static void
+deletePotentiallySavedGlobalRefs(JNIEnv *env, InvokeRequest *request)
+{
+    /* Delete potentially saved return value */
+    if ((request->invokeType == INVOKE_CONSTRUCTOR) ||
+        (returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT)) ||
+        (returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY))) {
+        if (request->returnValue.l != NULL) {
+            tossGlobalRef(env, &(request->returnValue.l));
+        }
+    }
+    /* Delete potentially saved exception */
+    if (request->exception != NULL) {
+        tossGlobalRef(env, &(request->exception));
+    }
+}
+
+/*
+ * Delete global argument references from the request which got put there before a
+ * invoke request was carried out. See fillInvokeRequest().
+ */
+static void
+deleteGlobalArgumentRefs(JNIEnv *env, InvokeRequest *request)
+{
+    void *cursor;
+    jint argIndex = 0;
+    jvalue *argument = request->arguments;
+    jbyte argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor);
+
+    if (request->clazz != NULL) {
+        tossGlobalRef(env, &(request->clazz));
+    }
+    if (request->instance != NULL) {
+        tossGlobalRef(env, &(request->instance));
+    }
+    /* Delete global argument references */
+    while (argIndex < request->argumentCount) {
+        if ((argumentTag == JDWP_TAG(OBJECT)) ||
+            (argumentTag == JDWP_TAG(ARRAY))) {
+            if (argument->l != NULL) {
+                tossGlobalRef(env, &(argument->l));
+            }
+        }
+        argument++;
+        argIndex++;
+        argumentTag = nextArgumentTypeTag(&cursor);
+    }
+}
+
 static jvmtiError
 fillInvokeRequest(JNIEnv *env, InvokeRequest *request,
                   jbyte invokeType, jbyte options, jint id,
@@ -320,6 +376,8 @@
 invokeConstructor(JNIEnv *env, InvokeRequest *request)
 {
     jobject object;
+
+    JDI_ASSERT_MSG(request->clazz, "Request clazz null");
     object = JNI_FUNC_PTR(env,NewObjectA)(env, request->clazz,
                                      request->method,
                                      request->arguments);
@@ -336,6 +394,7 @@
         case JDWP_TAG(OBJECT):
         case JDWP_TAG(ARRAY): {
             jobject object;
+            JDI_ASSERT_MSG(request->clazz, "Request clazz null");
             object = JNI_FUNC_PTR(env,CallStaticObjectMethodA)(env,
                                        request->clazz,
                                        request->method,
@@ -424,6 +483,7 @@
         case JDWP_TAG(OBJECT):
         case JDWP_TAG(ARRAY): {
             jobject object;
+            JDI_ASSERT_MSG(request->instance, "Request instance null");
             object = JNI_FUNC_PTR(env,CallObjectMethodA)(env,
                                  request->instance,
                                  request->method,
@@ -511,6 +571,8 @@
         case JDWP_TAG(OBJECT):
         case JDWP_TAG(ARRAY): {
             jobject object;
+            JDI_ASSERT_MSG(request->clazz, "Request clazz null");
+            JDI_ASSERT_MSG(request->instance, "Request instance null");
             object = JNI_FUNC_PTR(env,CallNonvirtualObjectMethodA)(env,
                                            request->instance,
                                            request->clazz,
@@ -607,6 +669,8 @@
     JNIEnv *env;
     jboolean startNow;
     InvokeRequest *request;
+    jbyte options;
+    jbyte invokeType;
 
     JDI_ASSERT(thread);
 
@@ -623,6 +687,9 @@
     if (startNow) {
         request->started = JNI_TRUE;
     }
+    options = request->options;
+    invokeType = request->invokeType;
+
     debugMonitorExit(invokerLock);
 
     if (!startNow) {
@@ -637,7 +704,7 @@
 
         JNI_FUNC_PTR(env,ExceptionClear)(env);
 
-        switch (request->invokeType) {
+        switch (invokeType) {
             case INVOKE_CONSTRUCTOR:
                 invokeConstructor(env, request);
                 break;
@@ -645,7 +712,7 @@
                 invokeStatic(env, request);
                 break;
             case INVOKE_INSTANCE:
-                if (request->options & JDWP_INVOKE_OPTIONS(NONVIRTUAL) ) {
+                if (options & JDWP_INVOKE_OPTIONS(NONVIRTUAL) ) {
                     invokeNonvirtual(env, request);
                 } else {
                     invokeVirtual(env, request);
@@ -723,12 +790,23 @@
     }
 
     /*
+     * At this time, there's no need to retain global references on
+     * arguments since the reply is processed. No one will deal with
+     * this request ID anymore, so we must call deleteGlobalArgumentRefs().
+     *
+     * We cannot delete saved exception or return value references
+     * since otherwise a deleted handle would escape when writing
+     * the response to the stream. Instead, we clean those refs up
+     * after writing the respone.
+     */
+    deleteGlobalArgumentRefs(env, request);
+
+    /*
      * Give up the lock before I/O operation
      */
     debugMonitorExit(invokerLock);
     eventHandler_unlock();
 
-
     if (!detached) {
         outStream_initReply(&out, id);
         (void)outStream_writeValue(env, &out, tag, returnValue);
@@ -736,6 +814,16 @@
         (void)outStream_writeObjectRef(env, &out, exc);
         outStream_sendReply(&out);
     }
+
+    /*
+     * Delete potentially saved global references of return value
+     * and exception
+     */
+    eventHandler_lock(); // for proper lock order
+    debugMonitorEnter(invokerLock);
+    deletePotentiallySavedGlobalRefs(env, request);
+    debugMonitorExit(invokerLock);
+    eventHandler_unlock();
 }
 
 jboolean
diff -r e4495735dfea -r dd99aac0647c src/share/native/sun/font/freetypeScaler.c
--- a/src/share/native/sun/font/freetypeScaler.c Mon Nov 14 06:34:37 2016 +0000
+++ b/src/share/native/sun/font/freetypeScaler.c Mon Feb 06 22:14:33 2017 +0000
@@ -38,7 +38,7 @@
 #include FT_SIZES_H
 #include FT_OUTLINE_H
 #include FT_SYNTHESIS_H
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
 #include FT_LCD_FILTER_H
 #include <fontconfig/fontconfig.h>
 #endif
@@ -49,7 +49,7 @@
 #define  FloatToFTFixed(f) (FT_Fixed)((f) * (float)(ftFixed1))
 #define  FTFixedToFloat(x) ((x) / (float)(ftFixed1))
 #define  FT26Dot6ToFloat(x)  ((x) / ((float) (1<<6)))
-#define  ROUND(x) ((int) (x+0.5))
+#define  ROUND26Dot6(x) ((x + 63) & -64)
 
 typedef struct {
     /* Important note:
@@ -655,7 +655,7 @@
     }
 }
 
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
 typedef struct {
     FT_Render_Mode ftRenderMode;
     int ftLoadFlags;
@@ -691,50 +691,66 @@
     return pattern;
 }
 
-static void readFontconfig(const FcChar8* family, double ptSize, jint aaType, RenderingProperties* rp) {
+static void readFontconfig(const FcChar8* family, FTScalerContext *context, RenderingProperties* rp) {
 
-    FcPattern *pattern = matchedPattern(family, ptSize);
+    FcPattern *pattern = matchedPattern(family, context->ptsz);
 
     int ftLoadFalgs = FT_LOAD_DEFAULT;
     FT_Render_Mode ftRenderMode;
     FT_LcdFilter ftLcdFilter;
     char horizontal = 1;
-    FcBool b;
+    FcBool fcAntialias = false, fcBool;
 
-    // subpixel order:
-    if (aaType == TEXT_AA_ON)
-        ftRenderMode = FT_RENDER_MODE_NORMAL;
-    else if (aaType == TEXT_AA_OFF)
-        ftRenderMode = FT_RENDER_MODE_MONO;
-    else if (FcPatternGetBool(pattern, FC_ANTIALIAS, 0, &b) == FcResultMatch)
-        if (b) {
+    // If the user has no antialias information set in their fontconfig directory
+    // and the font itself does not provide any hints either (which is common),
+    // Fontconfig may not return any antialias hint about the selected font since
+    // it does not set any default for this key internally.
+    // Use the antialias hint when it is available but only if antialiasing was
+    // actually requested by the caller.
+    // If antialiasing was requested but Fontconfig states to use no antialiasing,
+    // that takes precedence and also modifies the supplied context to account for
+    // the change (sets context->aaType to TEXT_AA_OFF as a side-effect in the render
+    // mode conditional block down below).
+    if (context->aaType != TEXT_AA_OFF) {
+        if (FcPatternGetBool(pattern, FC_ANTIALIAS, 0, &fcAntialias) != FcResultMatch)
+            fcAntialias = true;
+    }
+
+    // render mode:
+    if (fcAntialias) {
+        if (context->aaType == TEXT_AA_ON)
+            ftRenderMode = FT_RENDER_MODE_NORMAL;
+        else {
+            // subpixel order:
             int subpixel = FC_RGBA_UNKNOWN;
             FcPatternGetInteger(pattern, FC_RGBA, 0, &subpixel);
             if (subpixel == FC_RGBA_UNKNOWN)
                 subpixel = FC_RGBA_NONE;
-                switch (subpixel) {
-                case FC_RGBA_NONE:
-                    ftRenderMode = FT_RENDER_MODE_NORMAL;
-                    break;
-                case FC_RGBA_RGB:
-                case FC_RGBA_BGR:
-                    ftRenderMode = FT_RENDER_MODE_LCD;
-                    horizontal = 1;
-                    break;
-                case FC_RGBA_VRGB:
-                case FC_RGBA_VBGR:
-                    ftRenderMode = FT_RENDER_MODE_LCD_V;
-                    horizontal = 0;
-                    break;
-                default:
-                    break;
-                }
-            } else {
+            switch (subpixel) {
+            case FC_RGBA_NONE:
                 ftRenderMode = FT_RENDER_MODE_NORMAL;
+                break;
+            case FC_RGBA_RGB:
+            case FC_RGBA_BGR:
+                ftRenderMode = FT_RENDER_MODE_LCD;
+                horizontal = 1;
+                break;
+            case FC_RGBA_VRGB:
+            case FC_RGBA_VBGR:
+                ftRenderMode = FT_RENDER_MODE_LCD_V;
+                horizontal = 0;
+                break;
+            default:
+                break;
             }
+        }
+    } else {
+        ftRenderMode = FT_RENDER_MODE_MONO;
+        context->aaType = TEXT_AA_OFF; // if this was forced through Fontconfig
+   }
 
     // loading mode:
-    if (aaType == TEXT_AA_OFF)
+    if (!fcAntialias)
         ftLoadFalgs |= FT_LOAD_TARGET_MONO;
     else {
         int hint_style = FC_HINT_NONE;
@@ -750,7 +766,7 @@
             ftLoadFalgs |= FT_LOAD_TARGET_NORMAL;
             break;
         case FC_HINT_FULL:
-            if (aaType == TEXT_AA_ON)
+            if (fcAntialias)
                 ftLoadFalgs |= FT_LOAD_TARGET_NORMAL;
             else
                 ftLoadFalgs |= horizontal ? FT_LOAD_TARGET_LCD : FT_LOAD_TARGET_LCD_V;
@@ -763,9 +779,8 @@
     }
 
     // autohinting:
-    if (FcPatternGetBool(pattern, FC_AUTOHINT, 0, &b) == FcResultMatch)
-        if (b)
-            ftLoadFalgs |= FT_LOAD_FORCE_AUTOHINT;
+    if (FcPatternGetBool(pattern, FC_AUTOHINT, 0, &fcBool) == FcResultMatch && fcBool)
+        ftLoadFalgs |= FT_LOAD_FORCE_AUTOHINT;
 
     // LCD filter:
     int filter = FC_LCD_DEFAULT;
@@ -812,7 +827,7 @@
     GlyphInfo *glyphInfo;
     int glyph_index;
     FT_GlyphSlot ftglyph;
-#ifndef INFINALITY
+#ifndef IMPROVED_FONT_RENDERING
     int renderFlags = FT_LOAD_RENDER, target;
 #endif
 
@@ -831,10 +846,10 @@
         return ptr_to_jlong(getNullGlyphImage());
     }
 
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
     RenderingProperties renderingProperties;
     readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
-                   context->ptsz, context->aaType, &renderingProperties);
+                   context, &renderingProperties);
 #else
     /* if algorithmic styling is required then we do not request bitmap */
     if (context->doBold || context->doItalize) {
@@ -862,7 +877,7 @@
 
     glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
 
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
     FT_Library_SetLcdFilter(scalerInfo->library, renderingProperties.ftLcdFilter);
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
 #else
@@ -887,7 +902,7 @@
 
     /* generate bitmap if it is not done yet
      e.g. if algorithmic styling is performed and style was added to outline */
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
     FT_Render_Glyph(ftglyph, renderingProperties.ftRenderMode);
 #else
     if (ftglyph->format == FT_GLYPH_FORMAT_OUTLINE) {
@@ -925,18 +940,10 @@
         glyphInfo->advanceY =
             (float) (advh * FTFixedToFloat(context->transform.xy));
     } else {
-        if (!ftglyph->advance.y) {
-            glyphInfo->advanceX =
-                (float) ROUND(FT26Dot6ToFloat(ftglyph->advance.x));
-            glyphInfo->advanceY = 0;
-        } else if (!ftglyph->advance.x) {
-            glyphInfo->advanceX = 0;
-            glyphInfo->advanceY =
-                (float) ROUND(FT26Dot6ToFloat(-ftglyph->advance.y));
-        } else {
-            glyphInfo->advanceX = FT26Dot6ToFloat(ftglyph->advance.x);
-            glyphInfo->advanceY = FT26Dot6ToFloat(-ftglyph->advance.y);
-        }
+        glyphInfo->advanceX =
+            (float) FT26Dot6ToFloat(ROUND26Dot6(ftglyph->advance.x));
+        glyphInfo->advanceY =
+            (float) -FT26Dot6ToFloat(ROUND26Dot6(ftglyph->advance.y));
     }
 
     if (imageSize == 0) {
@@ -1107,7 +1114,7 @@
 static FT_Outline* getFTOutline(JNIEnv* env, jobject font2D,
         FTScalerContext *context, FTScalerInfo* scalerInfo,
         jint glyphCode, jfloat xpos, jfloat ypos) {
-#ifndef INFINALITY
+#ifndef IMPROVED_FONT_RENDERING
     int renderFlags;
 #endif
     int glyph_index;
@@ -1124,17 +1131,17 @@
         return NULL;
     }
 
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
     RenderingProperties renderingProperties;
     readFontconfig((const FcChar8 *) scalerInfo->face->family_name,
-                   context->ptsz, context->aaType, &renderingProperties);
+                   context, &renderingProperties);
 #else
     renderFlags = FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
 #endif
 
     glyph_index = FT_Get_Char_Index(scalerInfo->face, glyphCode);
 
-#ifdef INFINALITY
+#ifdef IMPROVED_FONT_RENDERING
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderingProperties.ftLoadFlags);
 #else
     error = FT_Load_Glyph(scalerInfo->face, glyphCode, renderFlags);
diff -r e4495735dfea -r dd99aac0647c test/com/sun/jdi/oom/@debuggeeVMOptions
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/oom/@debuggeeVMOptions Mon Feb 06 22:14:33 2017 +0000
@@ -0,0 +1,1 @@
+-Xmx40m
\ No newline at end of file
diff -r e4495735dfea -r dd99aac0647c test/com/sun/jdi/oom/OomDebugTest.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/jdi/oom/OomDebugTest.java Mon Feb 06 22:14:33 2017 +0000
@@ -0,0 +1,417 @@
+/*
+ * Copyright (c) 2016 Red Hat Inc.
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ *  @test
+ *  @bug 8153711
+ *  @summary JDWP: Memory Leak (global references not deleted after invokeMethod).