RFR: JDK-8285712: LogMessageBuffer doesn't check vsnprintf return value [v2]

Johan Sjölén duke at openjdk.java.net
Thu Apr 28 08:08:42 UTC 2022


> os::vsnprintf can return a negative value on encoding error. A negative return value will cause wraparound when cast to size_t. This in turn causes LogMessageBuffer::grow() to attempt a large memory allocation. Instead of accepting this we bail on the logging.

Johan Sjölén has updated the pull request incrementally with one additional commit since the last revision:

  Move va_end to avoid duplication

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8423/files
  - new: https://git.openjdk.java.net/jdk/pull/8423/files/3798bf8b..bbe720cd

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8423&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8423&range=00-01

  Stats: 3 lines in 1 file changed: 1 ins; 2 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8423.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8423/head:pull/8423

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


More information about the hotspot-runtime-dev mailing list