8325542: CTW: Runner can produce negative StressSeed
Reviewed-by: shade, xliu
This commit is contained in:
parent
5bf859c8e9
commit
bb675afae6
@ -38,6 +38,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.Random;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -266,7 +267,7 @@ public class CtwRunner {
|
||||
private String[] cmd(long classStart, long classStop) {
|
||||
String phase = phaseName(classStart);
|
||||
Path file = Paths.get(phase + ".cmd");
|
||||
var rng = Utils.getRandomInstance();
|
||||
Random rng = Utils.getRandomInstance();
|
||||
|
||||
ArrayList<String> Args = new ArrayList<String>(Arrays.asList(
|
||||
"-Xbatch",
|
||||
@ -301,7 +302,7 @@ public class CtwRunner {
|
||||
"-XX:+StressMacroExpansion",
|
||||
"-XX:+StressIncrementalInlining",
|
||||
// StressSeed is uint
|
||||
"-XX:StressSeed=" + Math.abs(rng.nextInt())));
|
||||
"-XX:StressSeed=" + rng.nextInt(Integer.MAX_VALUE)));
|
||||
|
||||
for (String arg : CTW_EXTRA_ARGS.split(",")) {
|
||||
Args.add(arg);
|
||||
|
Loading…
Reference in New Issue
Block a user