summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
author Fabien Sanglard <sanglardf@google.com> 2023-11-03 19:24:34 +0000
committer Fabien Sanglard <sanglardf@google.com> 2023-11-06 20:20:23 +0000
commita9ba4e358e88beaeebe64498be8fd7419c6d77c0 (patch)
tree34c4e3ee0ae4e9f67e632bc175d7742ee5b01a1a /runtime/quick_exception_handler.cc
parent67b53d01d0b66b4d4e07bf34af708e457ac1d5b1 (diff)
adbconnection: Reject subsequent debugger
Problem: After a JDWP client has been accepted, adbconnection does not poll(3) adbd for incoming data. This means if a client is connected, any subsequent client attempting to connect will hang (we never reply or close). There is actually a provision for this case on line 625 to reject a second debugger but this branch is never taken since we don't request poll(3) while we have a client. Solution: Change poll(3) request to always let us know of an incoming JDWP client. This let's us close(3) it and fail instead of hanging. Note this was the behavior up to API 28 (Dalvik implementation). Fixes: 309142640 Test: TBD For now, testing is done manually. ``` $ adb forward tcp:6666 jdwp:`adb shell pidof com.example.helloworld` $ jdb -attach localhost:6666 & $ jdb -attach localhost:6666 java.io.IOException: handshake failed - connection prematurally closed ``` Change-Id: I0f35bc8751acfc9740b7fd362685e96d31d03570
Diffstat (limited to 'runtime/quick_exception_handler.cc')
0 files changed, 0 insertions, 0 deletions