Skip to content

Commit

Permalink
move check, add assert
Browse files Browse the repository at this point in the history
  • Loading branch information
MBaesken committed Oct 28, 2024
1 parent f019b47 commit 1d240ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/hotspot/share/ci/ciEnv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1597,9 +1597,7 @@ void ciEnv::dump_replay_data_helper(outputStream* out) {
NoSafepointVerifier no_safepoint;
ResourceMark rm;

if (this->task() == nullptr) {
return;
}
assert(this->task() != nullptr, "task must not be null");

dump_replay_data_version(out);
#if INCLUDE_JVMTI
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/utilities/vmError.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
if (DumpReplayDataOnError && _thread && _thread->is_Compiler_thread() && !skip_replay) {
skip_replay = true;
ciEnv* env = ciEnv::current();
if (env != nullptr) {
if (env != nullptr && env->task() != nullptr) {
const bool overwrite = false; // We do not overwrite an existing replay file.
int fd = prepare_log_file(ReplayDataFile, "replay_pid%p.log", overwrite, buffer, sizeof(buffer));
if (fd != -1) {
Expand Down

0 comments on commit 1d240ea

Please sign in to comment.