[RFR] jdk8u272-b10/jdk8u272-ga

Aleksey Shipilev shade at redhat.com
Wed Oct 21 06:34:42 UTC 2020


On 10/21/20 8:32 AM, Aleksey Shipilev wrote:
> *) In src/share/classes/java/io/ObjectInputStream.java, blocks like these:
> 
> @@ -1894,6 +1923,11 @@
>                }
>            } catch (ClassNotFoundException ex) {
>                resolveEx = ex;
> +        } catch (OutOfMemoryError memerr) {
> +            IOException ex = new InvalidObjectException("Proxy interface limit exceeded: " +
> +                    Arrays.toString(ifaces));
> +            ex.initCause(memerr);
> +            throw ex;
>            }
> 
>    ...look way too optimistic to me. If that's a real OOME, then allocations in this block would
> highly likely to fail themselves. If that's a fake OOMEs, then they are thrown where?
> 
> I assume it is a fake OOME: I see the changeset (8249927: Specify limits of
> jdk.serialProxyInterfaceLimit), which seems to imply this. But, there is no
> "jdk.serialProxyInterfaceLimit" in sight in the patch or in existing source.

Ah, I am blind, there is a block with "serialProxyInterfaceLimit" in the same file:

1897         // Recheck against implementation limit and throw with interface names
1898         if (numIfaces > Caches.PROXY_INTERFACE_LIMIT) {
1899             throw new InvalidObjectException("interface limit exceeded: " +
1900                     numIfaces +
1901                     ", limit: " + Caches.PROXY_INTERFACE_LIMIT +
1902                     "; " + Arrays.toString(ifaces));
1903         }

So what the OOME catch block is doing?

-- 
Thanks,
-Aleksey



More information about the jdk8u-dev mailing list