Integrated: 8314481: JDWPTRANSPORT_ERROR_INTERNAL code in socketTransport.c can never be executed

Chris Plummer cjplummer at openjdk.org
Fri Aug 18 17:49:38 UTC 2023


On Thu, 17 Aug 2023 15:06:44 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> [JDK-8250630](https://bugs.openjdk.org/browse/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.

This pull request has now been integrated.

Changeset: fbe28ee9
Author:    Chris Plummer <cjplummer at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/fbe28ee90d018300259c1b515e340e60cbb30513
Stats:     6 lines in 1 file changed: 0 ins; 5 del; 1 mod

8314481: JDWPTRANSPORT_ERROR_INTERNAL code in socketTransport.c can never be executed

Reviewed-by: dcubed, sspitsyn

-------------

PR: https://git.openjdk.org/jdk/pull/15330


More information about the serviceability-dev mailing list