8336242: compiler/jvmci/jdk.vm.ci.code.test/src/jdk/vm/ci/code/test/SimpleDebugInfoTest.java failed assert(oopDesc::is_oop_or_null(val)) failed: bad oop found (again)

Reviewed-by: dnsimon, never
This commit is contained in:
David Leopoldseder 2024-07-31 09:40:47 +00:00 committed by Doug Simon
parent de0b50400a
commit 9b428dda8f

View File

@ -200,84 +200,4 @@ public class SimpleDebugInfoTest extends DebugInfoTest {
testLongOnStack(compiler);
testLongInLocal(compiler);
}
public static Class<?> objectOnStack() {
return SimpleDebugInfoTest.class;
}
private void testObjectOnStack(DebugInfoCompiler compiler) {
test(compiler, getMethod("objectOnStack"), 2, JavaKind.Object);
}
public static Class<?> objectInLocal() {
Class<?> local = SimpleDebugInfoTest.class;
return local;
}
private void testObjectInLocal(DebugInfoCompiler compiler) {
test(compiler, getMethod("objectInLocal"), 3, JavaKind.Object);
}
@Test
public void testConstObject() {
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
values[0] = constantReflection.asJavaClass(type);
return null;
};
testObjectOnStack(compiler);
testObjectInLocal(compiler);
}
@Test
public void testRegObject() {
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
values[0] = reg.asValue(asm.getValueKind(JavaKind.Object));
return null;
};
testObjectOnStack(compiler);
testObjectInLocal(compiler);
}
@Test
public void testStackObject() {
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
Register reg = asm.emitLoadPointer((HotSpotConstant) constantReflection.asJavaClass(type));
values[0] = asm.emitPointerToStack(reg);
return null;
};
testObjectOnStack(compiler);
testObjectInLocal(compiler);
}
@Test
public void testRegNarrowObject() {
Assume.assumeTrue(config.useCompressedOops);
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
values[0] = reg.asValue(asm.narrowOopKind);
return null;
};
testObjectOnStack(compiler);
testObjectInLocal(compiler);
}
@Test
public void testStackNarrowObject() {
Assume.assumeTrue(config.useCompressedOops);
ResolvedJavaType type = metaAccess.lookupJavaType(objectOnStack());
DebugInfoCompiler compiler = (asm, values) -> {
HotSpotConstant wide = (HotSpotConstant) constantReflection.asJavaClass(type);
Register reg = asm.emitLoadPointer((HotSpotConstant) wide.compress());
values[0] = asm.emitNarrowPointerToStack(reg);
return null;
};
testObjectOnStack(compiler);
testObjectInLocal(compiler);
}
}