RFR [7011804] SequenceInputStream with lots of empty substreams can cause StackOverflowError

Ivan Gerasimov ivan.gerasimov at oracle.com
Sun Mar 2 09:02:06 UTC 2014


Thank you Chris!

On 02.03.2014 12:37, Chris Hegarty wrote:
> The source changes look ok to me, but I can't imagine that anyone would run into this under normal circumstances.
>
> Quite trivially, I don't think the test needs to be run under othervm, especially with a fixed JDK.

It was meant to be for unfixed JDK.
Though, yes you're right - once the stack is unrolled, the VM again 
should be in a consistent state.
So, no othervm should be required.
I'll remove it.

Sincerely yours,
Ivan

> -Chris.
>
>> On 2 Mar 2014, at 07:58, Ivan Gerasimov <ivan.gerasimov at oracle.com> wrote:
>>
>> Hello!
>>
>> SequenceInputStream#read functions are implemented recursively.
>> This may cause stack overflow in some extreme cases with lots of empty substreams.
>>
>> Would you please help review the fix?
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/7011804
>> WEBREV: http://cr.openjdk.java.net/~igerasim/7011804/0/webrev/
>>
>> Sincerely yours,
>> Ivan
>




More information about the core-libs-dev mailing list