Skip to content

Commit 03eb709

Browse files
committed
8283725: Launching java with "-Xlog:gc*=trace,safepoint*=trace,class*=trace" crashes the JVM
Backport-of: 1ca0ede60d961a1355397f27fd78a177432c7bc3
1 parent 99eb134 commit 03eb709

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hotspot/share/logging/logOutput.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2022, 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
@@ -334,6 +334,11 @@ void LogOutput::update_config_string(const size_t on_level[LogLevel::Count]) {
334334

335335
assert(n_deviates < deviating_tagsets, "deviating tag set array overflow");
336336
assert(prev_deviates > n_deviates, "number of deviating tag sets must never grow");
337+
338+
if (n_deviates == 1 && n_selections == 0) {
339+
// we're done as we couldn't reduce things any further
340+
break;
341+
}
337342
}
338343
FREE_C_HEAP_ARRAY(LogTagSet*, deviates);
339344
FREE_C_HEAP_ARRAY(Selection, selections);

0 commit comments

Comments
 (0)