8247351: [aarch64] NullPointerException during stack walking (clhsdb "where -a")

Reviewed-by: cjplummer
This commit is contained in:
Nick Gasson 2021-07-14 09:02:43 +00:00
parent 589a1d53df
commit 357fe09f2e
2 changed files with 5 additions and 5 deletions
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -146,7 +146,7 @@ public abstract class RegisterMap implements Cloneable {
Assert.that(0 <= i && i < regCount, "sanity check");
Assert.that(0 <= index && index < locationValidSize, "sanity check");
}
if ((locationValid[index] & (1 << i % locationValidTypeSize)) != 0) {
if ((locationValid[index] & (1L << i % locationValidTypeSize)) != 0) {
return location[i];
} else {
return getLocationPD(reg);
@ -162,7 +162,7 @@ public abstract class RegisterMap implements Cloneable {
Assert.that(updateMap, "updating map that does not need updating");
}
location[i] = loc;
locationValid[index] |= (1 << (i % locationValidTypeSize));
locationValid[index] |= (1L << (i % locationValidTypeSize));
}
public boolean getIncludeArgumentOops() {

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, Red Hat Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -70,7 +70,7 @@ public class AARCH64Frame extends Frame {
// Native frames
private static final int NATIVE_FRAME_INITIAL_PARAM_OFFSET = 2;
private static VMReg fp = new VMReg(29);
private static VMReg fp = new VMReg(29 << 1);
static {
VM.registerVMInitializedObserver(new Observer() {