This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: RFC: Too many race conditions.
- From: Andrew Haley <aph-gcc at littlepinkcloud dot COM>
- To: David Daney <ddaney at avtrex dot com>
- Cc: java at gcc dot gnu dot org
- Date: Sun, 20 May 2007 11:59:47 +0100
- Subject: Re: RFC: Too many race conditions.
- References: <464F3346.6040700@avtrex.com>
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.