Skip to content

Commit 9f2f46e

Browse files
author
Harold Seigel
committedNov 17, 2021
8275037: Test vmTestbase/nsk/sysdict/vm/stress/btree/btree011/btree011.java crashes with memory exhaustion on Windows
Reviewed-by: coleenp
1 parent 2af9e59 commit 9f2f46e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎test/hotspot/jtreg/vmTestbase/nsk/sysdict/share/GenClassesBuilder.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2021, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -71,6 +71,7 @@ private static void build(String name, String prefix, Runnable generator) {
7171
moveJavaFiles(genSrcDir, prefix);
7272

7373
JDKToolLauncher javac = JDKToolLauncher.create("javac")
74+
.addToolArg("-J-Xmx1G")
7475
.addToolArg("-d")
7576
.addToolArg(classesDir.toString())
7677
.addToolArg("-cp")

‎test/hotspot/jtreg/vmTestbase/nsk/sysdict/share/SysDictTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ public void run() {
148148
// set name into public variable just to be sure
149149
// that class is loaded
150150
tmp = clz.getName();
151-
} catch (OutOfMemoryError | ClassNotFoundException e) {
152-
// just ignore
151+
} catch (OutOfMemoryError | ClassNotFoundException | NoClassDefFoundError e) {
152+
// just ignore, note that CNFE and NCDFE can be caused by OOM exceptions.
153153
} catch (StackOverflowError soe) {
154154
// just ignore, chains could be too large
155155
// StackOverflowError could be in some sparcs

0 commit comments

Comments
 (0)
Please sign in to comment.