RFR: JDK-8319704: LogTagSet::set_output_level() should not accept NULL as LogOutput [v2]
Thomas Stuefe
stuefe at openjdk.org
Fri Nov 10 13:11:12 UTC 2023
> Trivial change to add an assert.
>
> See [JDK-8319104](https://bugs.openjdk.org/browse/JDK-8319104)
>
> `LogTagSet::set_output_level()` and `LogOutputList::set_output_level` should not accept NULL as LogOutput* argument.
>
> They do, currently, which leads to delayed crashes later since the NULL output is registered in the output list.
>
> That triggered [JDK-8319104](https://bugs.openjdk.org/browse/JDK-8319104), where - due to a fluke in C++ initialization order and a mislabeling of LogTagSet tests as "TEST", without "_VM" - `LogTagSet::set_output_level()` was called with `LogConfiguration::StdoutLog` which was still uninitialized (null).
>
> An assert would have saved investigation time.
Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
Update logOutputList.cpp
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16555/files
- new: https://git.openjdk.org/jdk/pull/16555/files/f942134a..dffb264b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16555&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16555&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16555.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16555/head:pull/16555
PR: https://git.openjdk.org/jdk/pull/16555
More information about the hotspot-runtime-dev
mailing list