[7u4-osx] Request for approval for 7127660 (macosx) *Socket Async close not working (original) (raw)

Paul Hohensee paul.hohensee at oracle.com
Mon Jan 9 14:52:38 PST 2012


I actually fixed a similar problem in Hotspot a couple of weeks ago. See

http://hg.openjdk.java.net/hsx/hsx23/hotspot/rev/11c26bfcf8c7

I made methods like NET_RecvFrom take a socklen_t* instead of an int* and fixed their callers, which latter were in the JVM. Couldn't fix the libs though, so the JVM/libs interface does the save/restore thing in your original solution.

You could do a more extensive change and fix the callers of NET_RecvFrom.

Paul

On 1/9/12 5:41 PM, Paul Hohensee wrote:

Hopefully that will work everywhere it matters. If there's a size mismatch between int an socklent, there will be a problem. Maybe put in a comment to that effect?

paul On 1/9/12 5:33 PM, Michael McMahon wrote: I've updated the webrev to fix it.

http://cr.openjdk.java.net/~michaelm/7127660/webrev.1/ - Michael. On 09/01/12 22:13, Michael McMahon wrote: This is actually the same code that's always been there on Linux. It's an interesting observation though because on the face of it, it is dead code that shouldn't be. The reason it has always worked is that the value passed in is never different to the value returned. And we don't even check the returned value anywhere. Socket addresses always have the same size at runtime. I think I will remove the dead code at least, and add a comment.

- Michael On 09/01/12 21:56, Kelly O'Hair wrote: Don't think so.

I assume this socklen is to get around the different types needed. -kto On Jan 9, 2012, at 1:42 PM, Paul Hohensee wrote:

In NETRecvFrom(), isn't the last line

*fromlen = socklen; dead code that really shouldn't be dead? Paul On 1/9/12 4:27 PM, Michael McMahon wrote: This is a request to push the following fix to jdk7u-osx:

CR: http://bugs.sun.com/bugdatabase/viewbug.do?bugid=7127660 Webrev: http://cr.openjdk.java.net/~michaelm/7127660/webrev.1/ Reviewed by: alanb Thanks, Michael.



More information about the macosx-port-dev mailing list