RFR: 8335536: Fix assertion failure in IdealGraphPrinter when append is true
Qizheng Xing
qxing at openjdk.org
Tue Jul 2 09:38:25 UTC 2024
When `IdealGraphPrinter` is created with `append` set to true, it does not write the head element to the file in its constructor. But in the destructor, it always writes the tail element to the file no matter `append` is true or not, which causes an assertion failure in `xmlStream::pop_tag`.
This issue can be reproduced by calling `igv_append` directly, or by calling `Compile::igv_print_method_to_file` with `append` set to true.
This patch fixes the issue.
-------------
Commit messages:
- Fix assertion fail in `IdealGraphPrinter` when `append` is true.
Changes: https://git.openjdk.org/jdk/pull/19986/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19986&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8335536
Stats: 18 lines in 2 files changed: 7 ins; 0 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/19986.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/19986/head:pull/19986
PR: https://git.openjdk.org/jdk/pull/19986
More information about the hotspot-compiler-dev
mailing list