RFR [9] 8034181: SIGBUS at Java_sun_nio_ch_SctpChannelImpl_receive0

Dmitry Samersoff dmitry.samersoff at oracle.com
Sun Mar 23 09:37:06 UTC 2014


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 notifications from the SCTP Stack ( as well as for reading data off the socket ). This can result in a SIBGUS on sparc(v9) if the address is not 4 byte aligned [1].
> 
> The trivial solution is to copy the SCTP notification into a stack allocated buffer, for handling, if the given address is not 4 byte aligned.
> 
> http://cr.openjdk.java.net/~chegar/8034181/webev.00/webrev/
> 
> -Chris
> 
> [1] https://bugs.openjdk.java.net/browse/JDK-8034181
> 


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the source code.


More information about the net-dev mailing list