From a3540be502ef2f93c0fdc3fb2496c29ae7c8b041 Mon Sep 17 00:00:00 2001 From: Alex Menkov Date: Tue, 18 Mar 2025 17:59:01 +0000 Subject: [PATCH] 8352163: [AIX] SIGILL in AttachOperation::ReplyWriter::write_fully after 8319055 Reviewed-by: dholmes, mdoerr --- src/hotspot/share/services/attachListener.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hotspot/share/services/attachListener.cpp b/src/hotspot/share/services/attachListener.cpp index e3a6a034935..b57e357e897 100644 --- a/src/hotspot/share/services/attachListener.cpp +++ b/src/hotspot/share/services/attachListener.cpp @@ -127,9 +127,11 @@ public: // Called after the operation is completed. // If reply_writer is provided, writes the results. void complete() { - JavaThread* thread = JavaThread::current(); - ThreadBlockInVM tbivm(thread); - flush_reply(); + if (_reply_writer != nullptr) { + JavaThread* thread = JavaThread::current(); + ThreadBlockInVM tbivm(thread); + flush_reply(); + } } virtual void write(const char* str, size_t len) override {