ScopeDescs incorrect in Java 8

Andrew Haley aph at redhat.com
Fri Oct 9 12:55:26 UTC 2020


On 09/10/2020 11:14, David Griffiths wrote:
> 
> Ah... wait... found it. There is a bug in CodeBlob:
> 
>   public Address codeBegin() {
>     return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
>   }
> 
> That should be codeOffsetField!

Wow. Here's part of the patch that added codeBegin():

+  public Address codeBegin() {
+    return headerBegin().addOffsetTo(contentOffsetField.getValue(addr));
+  }
+
+  public Address codeEnd() {
     return headerBegin().addOffsetTo(dataOffsetField.getValue(addr));
   }

It looks like much of this code was rewritten in 8151956,
Support non-continuous CodeBlobs in HotSpot, so the bug no longer exists.

If you can come up with a bug report that explains the bug in more detail and
why your fix is correct, please post it as a reply to this mail. I'll create
the bug database entry and we'll get it fixed as a JDK 8-only bug.

(CC: added, jdk8u-dev)

-- 
Andrew Haley  (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671



More information about the hotspot-runtime-dev mailing list