File: default-jvm-cfg.diff

package info (click to toggle)
openjdk-25 25~16ea-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 831,448 kB
  • sloc: java: 5,683,507; xml: 1,321,180; cpp: 1,320,301; ansic: 487,129; asm: 404,003; objc: 21,025; sh: 15,223; javascript: 11,105; python: 8,266; makefile: 2,503; perl: 357; awk: 351; sed: 172; pascal: 103; exp: 54; jsp: 24
file content (23 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- a/src/java.base/share/native/libjli/java.c
+++ b/src/java.base/share/native/libjli/java.c
@@ -2127,7 +2127,7 @@ jint
 ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
 {
     FILE *jvmCfg;
-    char line[MAXPATHLEN+20];
+    char line[MAXPATHLEN+30];
     int cnt = 0;
     int lineno = 0;
     jlong start = 0, end = 0;
@@ -2141,6 +2141,11 @@ ReadKnownVMs(const char *jvmCfgName, jbo
 
     jvmCfg = fopen(jvmCfgName, "r");
     if (jvmCfg == NULL) {
+      char cfgName[strlen(jvmCfgName)+10];
+      sprintf(cfgName, "%s-default", jvmCfgName);
+      jvmCfg = fopen(cfgName, "r");
+    }
+    if (jvmCfg == NULL) {
       if (!speculative) {
         JLI_ReportErrorMessage(CFG_ERROR6, jvmCfgName);
         exit(1);