JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... constructors as follows: Method Outer. Middle(Outer) // constructor for Outer.Middle 0 aload_0 1 dup 2 aload_1 3 putfield #1 <Field Outer ...
Feb 5, 1997 ... ... constructors as follows: Method Outer. Middle(Outer) // constructor for Outer.Middle 0 aload_0 1 dup 2 aload_1 3 putfield #1 <Field Outer ...
The behaviour can even be "cloaked" by using java.util.regex classes: Matcher.group() etc. which seem to use substring internally for String extraction. This way it's nearly impossible to detect the memory leak. This behaviour is totally independent of OS, Java Version, VM type etc.
Reading and writing a string from and to a file are common File operations. Currently, java.nio.file.Files already provides methods for the conversion between a byte array and file, as well as a list and file.
C2 can generate out-of-bounds array loads. If executed, such a load can crash the VM, e.g. during GC, as the attached TEST.java demonstrates.The method returns a clone of the current node if it loads from the result of an Object.clone() call on an array.
For example, command line arguments and environment variables are presented to the user as if they were strings, but the typical content is filenames. Half-hearted attempts to fix this bug would leave us with the ability to access the underlying byte array only in some contexts.