Coleen comments

This commit is contained in:
Matias Saavedra Silva 2026-03-26 12:33:21 -04:00
parent 588682794a
commit b5f04edb52
2 changed files with 5 additions and 8 deletions

View File

@ -61,15 +61,12 @@ bool AOTClassInitializer::can_archive_initialized_mirror(InstanceKlass* ik) {
#ifdef ASSERT
if (AOTInitTestClass == nullptr && ArchiveHeapTestClass == nullptr) {
// The above flags (in debug builds only) allow java code to be executed in assembly phase,
// strictly for testing purposes. If these flags are not set, no java code will be executed
// The above flags (in debug builds only) allow Java code to be executed in assembly phase,
// strictly for testing purposes. If these flags are not set, no Java code should be executed
// in assembly phase.
if (ik->class_loader() != nullptr && !ik->is_hidden()) {
if (ik->is_interface() && !ik->interface_needs_clinit_execution_as_super()) {
// TODO: why are these interfaces marked as initialized??
} else {
assert(false, "cannot execute user code");
}
// Interfaces with default methods and <clinit> also execute Java code.
assert(ik->is_interface() && !ik->interface_needs_clinit_execution_as_super(), "cannot execute Java code in assembly phase, %d %d", ik->is_interface(), ik->interface_needs_clinit_execution_as_super());
}
}
#endif // ASSERT

View File

@ -324,7 +324,7 @@ public class CDSTestUtils {
public static void checkCommonExecExceptions(OutputAnalyzer output, Exception e)
throws Exception {
if (output.getStdout().contains("https://bugreport.java.com/bugreport/crash.jsp")) {
throw new RuntimeException("Hotspot crashed");
throw new RuntimeException(getCrashMessage(output.getStdout()));
}
if (output.getStdout().contains("TEST FAILED")) {
throw new RuntimeException("Test Failed");