Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8251118

BiasedLocking::preserve_marks should not have a HandleMark

    Details

    • Subcomponent:
    • Resolved In Build:
      b12

      Backports

        Description

        Recent changes added a HandleMark and this function creates Handles to hold oops over GC. It breaks the usual scoping conventions. Since BiasedLocking is default false, we didn't find this in testing. But Thanks to [~hseigel] for finding it.

        To reproduce change this test and run.

        diff --git a/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java b/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java
        --- a/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java
        +++ b/test/hotspot/jtreg/runtime/7158988/FieldMonitor.java
        @@ -62,7 +62,7 @@
         
           public static final String CLASS_NAME = "TestPostFieldModification";
           public static final String FIELD_NAME = "value";
        - public static final String ARGUMENTS = "-Xshare:off -Xlog:gc";
        + public static final String ARGUMENTS = "-Xshare:off -Xlog:gc -XX:+UseBiasedLocking";
         
           public static void main(String[] args)
               throws IOException, InterruptedException {

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pchilanomate Patricio Chilano Mateo
                  Reporter:
                  coleenp Coleen Phillimore
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: