Re: RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

2014-03-24 Thread Chris Hegarty
On 24/03/14 16:17, Alan Bateman wrote: On 24/03/2014 14:09, Chris Hegarty wrote: Alan, Dmitry, I updated the webrev. It now allocates memory dynamically, and asserts that the number of bytes read is less than the size of sctp_notification ( for notifications ). http://cr.openjdk.java.net/~cheg

Re: RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

2014-03-24 Thread Alan Bateman
On 24/03/2014 14:09, Chris Hegarty wrote: Alan, Dmitry, I updated the webrev. It now allocates memory dynamically, and asserts that the number of bytes read is less than the size of sctp_notification ( for notifications ). http://cr.openjdk.java.net/~chegar/8034181/webrev.01/webrev/ -Chris.

Re: RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

2014-03-24 Thread Chris Hegarty
Alan, Dmitry, I updated the webrev. It now allocates memory dynamically, and asserts that the number of bytes read is less than the size of sctp_notification ( for notifications ). http://cr.openjdk.java.net/~chegar/8034181/webrev.01/webrev/ -Chris. On 22/03/14 08:19, Alan Bateman wrote: O

Re: RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

2014-03-23 Thread Dmitry Samersoff
Chris, It's better to check that rv is less than NOTIFICATION_BUFFER_SIZE. -Dmitry On 2014-03-22 12:13, Chris Hegarty wrote: > The native SCTP implementation assumes that the given byte buffer ( buffer > address + position ) is memory aligned. It re-uses the buffer for handling > notificatio

Re: RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

2014-03-22 Thread Chris Hegarty
On 22 Mar 2014, at 08:19, Alan Bateman wrote: > On 22/03/2014 08:13, Chris Hegarty wrote: >> The native SCTP implementation assumes that the given byte buffer ( buffer >> address + position ) is memory aligned. It re-uses the buffer for handling >> notifications from the SCTP Stack ( as well a

Re: RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

2014-03-22 Thread Alan Bateman
On 22/03/2014 08:13, Chris Hegarty wrote: The native SCTP implementation assumes that the given byte buffer ( buffer address + position ) is memory aligned. It re-uses the buffer for handling notifications from the SCTP Stack ( as well as for reading data off the socket ). This can result in a