On Fri, 9 Jul 2021 08:37:00 GMT, Nick Gasson <ngas...@openjdk.org> wrote:
> Running the jtreg test serviceability/sa/ClhsdbWhere.java with -Xcomp > -XX:-TieredCompilation fails with the following exception: > > Error: java.lang.NullPointerException: Cannot invoke > "sun.jvm.hotspot.debugger.Address.getJLongAt(long)" because "valueAddr" is > null > java.lang.NullPointerException: Cannot invoke > "sun.jvm.hotspot.debugger.Address.getJLongAt(long)" because "valueAddr" is > null > at > jdk.hotspot.agent/sun.jvm.hotspot.runtime.CompiledVFrame.createStackValue(CompiledVFrame.java:270) > at > jdk.hotspot.agent/sun.jvm.hotspot.runtime.CompiledVFrame.getLocals(CompiledVFrame.java:107) > at > jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTMLForJavaStackTrace(HTMLGenerator.java:1937) > at > jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$43.doit(CommandProcessor.java:1573) > at > jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2090) > at > jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:2060) > > The oop map for the frame being inspected is: > > ScopeDesc(pc=0x0000ffff8957e000 offset=140): > jdk.test.lib.apps.LingeredApp::steadyState@7 (line 536) > Locals > - l0: empty > - l1: reg rfp [58],oop > - l2: empty > Monitor stack > - @0: monitor{reg rfp [58],oop,stack[16]} > > But RegisterMap::getLocation() returns a null Address for register > 58 (=RFP). > > This patch fixes two problems: the fp VMReg value used in > AARCH64Frame::updateMapWithSavedLink should be 29<<1 not 29 because a > VMReg has two slots in a 64-bit VM. The other bug is that > RegisterMap::setLocation and getLocation calculate the long > locationValid mask using (1 << (i % locationValidTypeSize)) where i and > locationValidTypeSize are both int. We need to do this calculation as a > long if i % locationValidTypeSize can be > 32. There's no failure on > x86_64 because that only has 16 integer registers. This looks like a dup of [https://bugs.openjdk.java.net/browse/JDK-8247351](JDK-8247351). If so, please close this CR out as a dup and target this PR to JDK-8247351. ------------- PR: https://git.openjdk.java.net/jdk/pull/4737