JDK-8314481 : JDWPTRANSPORT_ERROR_INTERNAL code in socketTransport.c can never be executed
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 16
  • Priority: P5
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-08-16
  • Updated: 2023-08-18
  • Resolved: 2023-08-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 masterFixed
Related Reports
Relates :  
Description
JDK-8250630 introduced the following change:

     if (listenAddr == NULL) {
  +        // No address of preferred addres family found, grab the fist one.
  +        listenAddr = &(addrInfo[0]);
  +    }
  +
  +    if (listenAddr == NULL) {
         dbgsysFreeAddrInfo(addrInfo);
         RETURN_ERROR(JDWPTRANSPORT_ERROR_INTERNAL, "listen failed: wrong address");
     }

After this change it is no longer possible for the RETURN_ERROR block to ever be executed because listenAddr can not ever still be NULL. The entire block should be removed.

Note this also means that JDK-8248911 can no longer possibly happen.
Comments
Changeset: fbe28ee9 Author: Chris Plummer <cjplummer@openjdk.org> Date: 2023-08-18 17:46:36 +0000 URL: https://git.openjdk.org/jdk/commit/fbe28ee90d018300259c1b515e340e60cbb30513
18-08-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/15330 Date: 2023-08-17 15:06:44 +0000
17-08-2023