[11u] RFR: Backport of 8214777: Avoid some GCC 8.X strncpy() errors in HotSpot

Simon Tooke stooke at redhat.com
Thu Aug 15 13:49:58 UTC 2019


This is a request to backport the changes required to fix 8214777 in JDK
11u.

The original patch does not apply cleanly, but only because there were
some comment changes in classFileParser.cpp.

(There are other changes in classFileParser.cpp that should probably be
backported [1] but I'll request that later).

bug: https://bugs.openjdk.java.net/browse/JDK-8214777

original patch: http://hg.openjdk.java.net/jdk/jdk/rev/ca682d9d8db5

modified patch: 
http://cr.openjdk.java.net/~stooke/webrevs/jdk-8214777-jdk11u/webrev.00/

The actual relevant changes to the original patch:

    $ diff 8214777-jdk11.patch jdk-8214777-jdk13.patch
    164c164
    < -    // Append anonymous class name. The anonymous class name can
    contain odd
    ---
    > -    // Append unsafe anonymous class name. The unsafe anonymous
    class name can contain odd
    175,176c175,178
    < @@ -5761,7 +5758,5 @@
    <      // Create a symbol and update the anonymous class name.
    ---
    > @@ -5761,9 +5758,7 @@
    >      // The new class name is created with a refcount of one. When
    installed into the InstanceKlass,
    >      // it'll be two and when the ClassFileParser destructor runs,
    it'll go back to one and get deleted
    >      // when the class is unloaded.
    $
     

Thank you for your time,

-Simon


[1]  https://bugs.openjdk.java.net/browse/JDK-8218755  : Refix Symbol
leak in prepend_host_package_name




More information about the jdk-updates-dev mailing list