RFC: 8216472: Stack overflow followed by crash

Alex Kashchenko akashche at redhat.com
Mon Nov 4 22:29:17 UTC 2019


On 11/04/2019 07:32 AM, Alan Bateman wrote:
> On 26/10/2019 18:13, Alan Bateman wrote:
>> On 25/10/2019 12:31, Alex Kashchenko wrote:
>>>
>>> Thanks for your comments! Updated the patch including them:
>>>
>>> http://cr.openjdk.java.net/~akasko/jdk/8216472/webrev.01/
>>>
>> Thanks for the update, I just quickly looked at it and this is much 
>> better. I suspect the native method will need to ignore WSANOTSOCK and 
>> return 0. I've really busy just now and I will get back to you in the 
>> next few days with more on this.
>>
> I took a second pass over this. I initially thought it would need to 
> handle WSANOTSOCK but with recent changes to the selectable channel 
> implementations means it shouldn't be needed.
> 
> I think the test will need a bit clean-up. The channel connecting to a 
> random port on the loopback interface will be a distraction to anyone 
> looking at the test. I assume "chan" can be removed and the test changed 
> to use selectNow (that will return 0). If you rename it to something 
> like StackOverflowTest then it might help future maintainers too.

Renamed and simplified the test. In this form it does not produce hs_err 
files anymore (stack overflow happens inside mswsock.dll and OS kills 
the process). Changes to WindowsSelectorImpl are left the same:

https://cr.openjdk.java.net/~akasko/jdk/8216472/webrev.02/

-- 
-Alex



More information about the nio-dev mailing list