JDK-8222529 : sun.jdwp.listenerAddress agent property uses wrong encoding
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 11,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-16
  • Updated: 2020-06-04
  • Resolved: 2019-04-30
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 11 JDK 13
11.0.6Fixed 13 b19Fixed
Related Reports
Relates :  
Relates :  
Description
When the debugging backend listens, it sets the agent property "sun.jdwp.listenerAddress" to the current listening address.

The code currently uses NewStringUTF() to create the Java string from the C string, which assumes it is given in UTF-8. But in reality, the address is in platform encoding, so it should be converted via JNU_NewStringPlatform().
Comments
This change causes a regression, tracked in JDK-8244703.
23-05-2020

Hi Ralf Backport looks good. I'll run it through testing and then push it for you. Best regards Christoph
18-09-2019

Fix request This patch applies cleanly, is small and fixes a bug. It should be ported to jdk11u
17-09-2019

Targeted this issue to 13 as it is already in review on the serviceability-dev mailing list.
26-04-2019