Running attached Test2.java deliberately crashes the VM and error reporting then prints a live String as part of the "Register to memory mapping" section. Since the String is large, error reporting takes a significant amount of time and the generated hs_err file is > 25 MB. This can easily be made worse by increasing String size and/or adding more Strings.
java -XX:-TieredCompilation -Xcomp -XX:CompileCommand=compileonly,Test2::test Test2.java
Register to memory mapping:
RAX=0x000000062bc51ed0 is an oop: java.lang.String
{0x000000062bc51ed0} - klass: 'java/lang/String'
- string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxx [...]
Similar to MaxElementPrintSize for array elements, the number of String characters that are printed should be limited.
The issue was originally found by [~davleopo] with an internal test. I wrote a standalone reproducer (attached Test2.java).
java -XX:-TieredCompilation -Xcomp -XX:CompileCommand=compileonly,Test2::test Test2.java
Register to memory mapping:
RAX=0x000000062bc51ed0 is an oop: java.lang.String
{0x000000062bc51ed0} - klass: 'java/lang/String'
- string: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxx [...]
Similar to MaxElementPrintSize for array elements, the number of String characters that are printed should be limited.
The issue was originally found by [~davleopo] with an internal test. I wrote a standalone reproducer (attached Test2.java).
- relates to
-
JDK-8336816 runtime/PrintingTests/StringPrinting.java fails with release VMs
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/10fcad70
-
Review(master) openjdk/jdk/20150