Integrated: JDK-8319704: LogTagSet::set_output_level() should not accept NULL as LogOutput
Thomas Stuefe
stuefe at openjdk.org
Mon Nov 13 08:34:09 UTC 2023
On Wed, 8 Nov 2023 11:00:35 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 4d650fe8
Author: Thomas Stuefe <stuefe at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/4d650fe85fe780cf69070184d049a423cbc7d20e
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
8319704: LogTagSet::set_output_level() should not accept NULL as LogOutput
Reviewed-by: jsjolen, dholmes
-------------
PR: https://git.openjdk.org/jdk/pull/16555
More information about the hotspot-runtime-dev
mailing list