--- old/src/hotspot/share/utilities/ostream.cpp 2020-04-10 20:11:12.265307061 +0800 +++ new/src/hotspot/share/utilities/ostream.cpp 2020-04-10 20:11:12.067312857 +0800 @@ -565,7 +565,9 @@ } void fileStream::flush() { - fflush(_file); + if (_file != NULL) { + fflush(_file); + } } void fdStream::write(const char* s, size_t len) {