This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Too many race conditions.


David Daney writes:
 > I have been thinking about:
 > 
 > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29604
 > 
 > My inclination is to do nothing.  My analysis (int the bug report), 
 > makes me think that to fix the race, all I/O operations would have to  
 > enter  a  synchronized block twice.  This would create a tremendous 
 > overhead.
 > 
 > Opinions?

Hmm.  This depends, does it not, on the fact that a blocking call does
not return when a file descriptor is closed?  This sounds to me like a
bug in the kernel, although perhaps it's a bug that has to be
maintained for backwards compatibility.  Blocking on a closed soucket
doesn't sound to me like a fruitful activity.

Anyway, I'm with you on the "do nothing" front.  Where does the bug
really lie, in the library or in the application code?  Decent design
doesn't usually involve opening a socket in one thread and then
passing that socket to another thread to close.  Is this an
exploitable security hole?  I suppose it is.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]