File tree Expand file tree Collapse file tree 9 files changed +53
-8
lines changed
test/hotspot/jtreg/vmTestbase/nsk/stress/strace Expand file tree Collapse file tree 9 files changed +53
-8
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -155,6 +155,11 @@ static boolean makeSnapshot() {
155155 StackTraceElement [] all ;
156156 for (int i = 1 ; i < THRD_COUNT ; i ++) {
157157 all = (StackTraceElement []) traces .get (threads [i ]);
158+ if (all == null ) {
159+ complain ("No stacktrace for thread " + threads [i ].getName () +
160+ " was found in the set of all traces" );
161+ return false ;
162+ }
158163 int k = all .length ;
159164 if (count - k > 2 ) {
160165 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -159,6 +159,11 @@ static boolean makeSnapshot() {
159159 StackTraceElement [] all ;
160160 for (int i = 1 ; i < THRD_COUNT ; i ++) {
161161 all = (StackTraceElement []) traces .get (threads [i ]);
162+ if (all == null ) {
163+ complain ("No stacktrace for thread " + threads [i ].getName () +
164+ " was found in the set of all traces" );
165+ return false ;
166+ }
162167 int k = all .length ;
163168 if (count - k > 2 ) {
164169 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -159,6 +159,11 @@ static boolean makeSnapshot() {
159159 StackTraceElement [] all ;
160160 for (int i = 1 ; i < THRD_COUNT ; i ++) {
161161 all = (StackTraceElement []) traces .get (threads [i ]);
162+ if (all == null ) {
163+ complain ("No stacktrace for thread " + threads [i ].getName () +
164+ " was found in the set of all traces" );
165+ return false ;
166+ }
162167 int k = all .length ;
163168 if (count - k > 2 ) {
164169 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -177,6 +177,11 @@ boolean makeSnapshot() {
177177 StackTraceElement [] all ;
178178 for (int i = 1 ; i < THRD_COUNT ; i ++) {
179179 all = (StackTraceElement []) traces .get (threads [i ]);
180+ if (all == null ) {
181+ complain ("No stacktrace for thread " + threads [i ].getName () +
182+ " was found in the set of all traces" );
183+ return false ;
184+ }
180185 int k = all .length ;
181186 if (count - k > 2 ) {
182187 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -178,6 +178,11 @@ boolean makeSnapshot() {
178178 StackTraceElement [] all ;
179179 for (int i = 1 ; i < THRD_COUNT ; i ++) {
180180 all = (StackTraceElement []) traces .get (threads [i ]);
181+ if (all == null ) {
182+ complain ("No stacktrace for thread " + threads [i ].getName () +
183+ " was found in the set of all traces" );
184+ return false ;
185+ }
181186 int k = all .length ;
182187 if (count - k > 2 ) {
183188 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -182,6 +182,11 @@ boolean makeSnapshot() {
182182 StackTraceElement [] all ;
183183 for (int i = 1 ; i < THRD_COUNT ; i ++) {
184184 all = (StackTraceElement []) traces .get (threads [i ]);
185+ if (all == null ) {
186+ complain ("No stacktrace for thread " + threads [i ].getName () +
187+ " was found in the set of all traces" );
188+ return false ;
189+ }
185190 int k = all .length ;
186191 if (count - k > 2 ) {
187192 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -170,6 +170,11 @@ boolean makeSnapshot() {
170170 StackTraceElement [] all ;
171171 for (int i = 1 ; i < THRD_COUNT ; i ++) {
172172 all = (StackTraceElement []) traces .get (threads [i ]);
173+ if (all == null ) {
174+ complain ("No stacktrace for thread " + threads [i ].getName () +
175+ " was found in the set of all traces" );
176+ return false ;
177+ }
173178 int k = all .length ;
174179 if (count - k > 2 ) {
175180 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change @@ -173,6 +173,11 @@ boolean makeSnapshot() {
173173 StackTraceElement [] all ;
174174 for (int i = 1 ; i < THRD_COUNT ; i ++) {
175175 all = (StackTraceElement []) traces .get (threads [i ]);
176+ if (all == null ) {
177+ complain ("No stacktrace for thread " + threads [i ].getName () +
178+ " was found in the set of all traces" );
179+ return false ;
180+ }
176181 int k = all .length ;
177182 if (count - k > 2 ) {
178183 complain ("wrong lengths of stack traces:\n \t "
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2003, 2020 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2003, 2024 , 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
@@ -174,6 +174,11 @@ boolean makeSnapshot() {
174174 StackTraceElement [] all ;
175175 for (int i = 1 ; i < THRD_COUNT ; i ++) {
176176 all = (StackTraceElement []) traces .get (threads [i ]);
177+ if (all == null ) {
178+ complain ("No stacktrace for thread " + threads [i ].getName () +
179+ " was found in the set of all traces" );
180+ return false ;
181+ }
177182 int k = all .length ;
178183 if (count - k > 2 ) {
179184 complain ("wrong lengths of stack traces:\n \t "
You can’t perform that action at this time.
0 commit comments