JDK-8161256: general data in constant pools - Java Issue Tracker
Jul 12, 2016 ... ... array of a varargs method. In this case, the JVM does not eagerly ... code are TBD, but see static methods above for an example. Source ...
Jul 12, 2016 ... ... array of a varargs method. In this case, the JVM does not eagerly ... code are TBD, but see static methods above for an example. Source ...
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.
Extracting the library related issue from 6460346. In ObjectOutputStream the HandleTable class grows its internal arrays by always doubling the length and adding one. This will overflow well short of the physical maximum length of Integer.MAX_VALUE.