< prev index next >

test/hotspot/jtreg/runtime/ErrorHandling/AccessZeroNKlassHitsProtectionZone.java

Print this page

193         ArrayList<Pattern> hsErrPatternList = new ArrayList<>();
194         hsErrPatternList.add(Pattern.compile(".*(SIGBUS|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).*"));
195 
196         hsErrPatternList.add(Pattern.compile(".*siginfo:.*" + expectedCrashAddressString + ".*"));
197         hsErrPatternList.add(Pattern.compile(".*" + expectedCrashAddressString + ".*points into nKlass protection zone.*"));
198         Pattern[] hsErrPattern = hsErrPatternList.toArray(new Pattern[0]);
199         HsErrFileUtils.checkHsErrFileContent(hsErrFile, hsErrPattern, true);
200     }
201 
202     enum Argument { runwb, no_coh_no_cds, no_coh_cds, coh_no_cds, coh_cds };
203     public static void main(String[] args) throws Exception {
204         if (args.length != 1) {
205             throw new RuntimeException("Expecting one argument");
206         }
207         Argument arg = Argument.valueOf(args[0]);
208         System.out.println(arg);
209         switch (arg) {
210             case runwb -> WhiteBox.getWhiteBox().decodeNKlassAndAccessKlass(0);
211             case no_coh_no_cds -> run_test(false, false);
212             case no_coh_cds -> run_test(false, true);
213             case coh_no_cds -> run_test(true, false);
214             case coh_cds -> run_test(true, true);

215         }
216     }
217 }

193         ArrayList<Pattern> hsErrPatternList = new ArrayList<>();
194         hsErrPatternList.add(Pattern.compile(".*(SIGBUS|SIGSEGV|EXCEPTION_ACCESS_VIOLATION).*"));
195 
196         hsErrPatternList.add(Pattern.compile(".*siginfo:.*" + expectedCrashAddressString + ".*"));
197         hsErrPatternList.add(Pattern.compile(".*" + expectedCrashAddressString + ".*points into nKlass protection zone.*"));
198         Pattern[] hsErrPattern = hsErrPatternList.toArray(new Pattern[0]);
199         HsErrFileUtils.checkHsErrFileContent(hsErrFile, hsErrPattern, true);
200     }
201 
202     enum Argument { runwb, no_coh_no_cds, no_coh_cds, coh_no_cds, coh_cds };
203     public static void main(String[] args) throws Exception {
204         if (args.length != 1) {
205             throw new RuntimeException("Expecting one argument");
206         }
207         Argument arg = Argument.valueOf(args[0]);
208         System.out.println(arg);
209         switch (arg) {
210             case runwb -> WhiteBox.getWhiteBox().decodeNKlassAndAccessKlass(0);
211             case no_coh_no_cds -> run_test(false, false);
212             case no_coh_cds -> run_test(false, true);
213             // TODO 8348568 Re-enable
214             // case coh_no_cds -> run_test(true, false);
215             // case coh_cds -> run_test(true, true);
216         }
217     }
218 }
< prev index next >