Integrated: 8268165: AsyncLogging will crash if rotate() fails

Xin Liu xliu at openjdk.java.net
Tue Jun 8 07:23:17 UTC 2021


On Thu, 3 Jun 2021 09:39:16 GMT, Xin Liu <xliu at openjdk.org> wrote:

> LogFileOutput::rotate() may leave _stream NULL because os::fopen() may return NULL due to space or inode limitations. AsyncLogWriter::write() calls LogFileOutput::write_blocking() without null check. Null check is added to prevent from crashing.

This pull request has now been integrated.

Changeset: 81054789
Author:    Xin Liu <xliu at openjdk.org>
Committer: Yasumasa Suenaga <ysuenaga at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/81054789a32f29b06f0804e09aabd7cf17464778
Stats:     26 lines in 1 file changed: 19 ins; 4 del; 3 mod

8268165: AsyncLogging will crash if rotate() fails

LogFileOutput::rotate() may leave _stream NULL because os::fopen() may return NULL due to space or inode limitations.  AsyncLogWriter::write() calls LogFileOutput::write_blocking() without null check.  Null check is added to prevent from crashing.

Reviewed-by: ysuenaga

-------------

PR: https://git.openjdk.java.net/jdk/pull/4332


More information about the hotspot-runtime-dev mailing list