From ff2e7ed9f5ccbc4f9c39a33e1ee5184dba4ce237 Mon Sep 17 00:00:00 2001 From: Evgeny Astigeevich Date: Fri, 24 May 2024 11:50:47 +0000 Subject: [PATCH] 8332632: Redundant assert(false, "compiler should always document failure: %s" with possible UB --- src/hotspot/share/compiler/compileBroker.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/hotspot/share/compiler/compileBroker.cpp b/src/hotspot/share/compiler/compileBroker.cpp index 45b0b331e2513..d444a6e572482 100644 --- a/src/hotspot/share/compiler/compileBroker.cpp +++ b/src/hotspot/share/compiler/compileBroker.cpp @@ -2315,8 +2315,7 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) { DirectivesStack::release(directive); if (!ci_env.failing() && !task->is_success()) { - assert(ci_env.failure_reason() != nullptr, "expect failure reason"); - assert(false, "compiler should always document failure: %s", ci_env.failure_reason()); + assert(ci_env.failure_reason() != nullptr, "compiler should always document failure"); // The compiler elected, without comment, not to register a result. // Do not attempt further compilations of this method. ci_env.record_method_not_compilable("compile failed");