summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2010-11-01 14:19:59 -0700
committerBrian Carlstrom <bdc@google.com>2010-11-01 16:23:37 -0700
commitaa37a8aa3af5a638cdf4e67f9273fb8118a11dee (patch)
treec68b673bd7fbaf940177729570be76b4942cfb79 /annotations/generate_annotated_java_files.py
parent95d52b3b1446af2fefd46f57efc1afb6c679e8cc (diff)
Avoid races between OpenSSLSocketImpl I/O and close()
The previous change: commit 5f2e6872311240319509aed64d9f58cd5b64719b Author: Brian Carlstrom <bdc@google.com> Date: Mon Aug 23 14:06:51 2010 -0700 SSLSocket.read should throw SocketException not NullPointerException added checkOpen() to throw SocketException instead of NullPointerException, but there was still a race between read/write on one thread and close on another that could allow a NullPointerException to escape. This change moves checkOpen() calls to be protected by the existing writeLock/readLock/handshakeLock synchronzied blocks to avoid this case. byte buffer error checking for read/write is also moved into the to lock region to preserve compatability as measured by the test: libcore.javax.net.ssl.SSLSocketTest#test_SSLSocket_close Bug: 3153162
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions