RFR: 8258836: JNI local refs exceed capacity getDiagnosticCommandInfo [v4]

Aleksey Shipilev shade at openjdk.java.net
Thu Jan 21 09:08:58 UTC 2021


On Wed, 20 Jan 2021 14:34:15 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

>> This patch adds some explicit capacity for local refs. New regression test
>> fails prior and passes after the patch.
>> 
>> Thoughts?
>
> Severin Gehwolf has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
> 
>  - Merge branch 'master' into JDK-8258836-check-jni-mbeanserver
>  - Actually assign the variable returned from PopLocalFrame
>  - Merge test files into one
>  - Adress review feedback from dholmes
>  - Merge branch 'master' into JDK-8258836-check-jni-mbeanserver
>  - 8258836: JNI local refs exceed capacity getDiagnosticCommandInfo

The test looks good. You might want to say `/reviewers 2` to keep bots from assuming this approval is enough.

test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanTestCheckJni.java line 60:

> 58: class DcmdMBeanRunner {
> 59: 
> 60:     private static String HOTSPOT_DIAGNOSTIC_MXBEAN_NAME =

Excess newline and the filed could be `static final`. Actually, you might even go and merge both classes, and then pass a fake java arg in `main` to disambiguate the "driver" and "test" code, like:

    public static void main(String[] args) {
        if (args.length == 0) {
            driver();
        } else {
            runner();
        }
    }

Your call.

-------------

Marked as reviewed by shade (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/2130


More information about the serviceability-dev mailing list