Skip to content

Commit 7727131

Browse files
author
duke
committed
Backport beff8bfe2a5334823b67cb748bc8652dc6a3f3d4
1 parent 22d5e0d commit 7727131

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/hotspot/share/ci/ciEnv.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,6 +1655,8 @@ void ciEnv::dump_replay_data_helper(outputStream* out) {
16551655
NoSafepointVerifier no_safepoint;
16561656
ResourceMark rm;
16571657

1658+
assert(this->task() != nullptr, "task must not be null");
1659+
16581660
dump_replay_data_version(out);
16591661
#if INCLUDE_JVMTI
16601662
out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables);
@@ -1675,9 +1677,7 @@ void ciEnv::dump_replay_data_helper(outputStream* out) {
16751677
objects->at(i)->dump_replay_data(out);
16761678
}
16771679

1678-
if (this->task() != nullptr) {
1679-
dump_compile_data(out);
1680-
}
1680+
dump_compile_data(out);
16811681
out->flush();
16821682
}
16831683

src/hotspot/share/utilities/vmError.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1838,7 +1838,7 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
18381838
if (DumpReplayDataOnError && _thread && _thread->is_Compiler_thread() && !skip_replay) {
18391839
skip_replay = true;
18401840
ciEnv* env = ciEnv::current();
1841-
if (env != nullptr) {
1841+
if (env != nullptr && env->task() != nullptr) {
18421842
const bool overwrite = false; // We do not overwrite an existing replay file.
18431843
int fd = prepare_log_file(ReplayDataFile, "replay_pid%p.log", overwrite, buffer, sizeof(buffer));
18441844
if (fd != -1) {

0 commit comments

Comments
 (0)