RFR: JDK-8249550: jdb should use loopback address when not using remote agent
    Alex Menkov 
    alexey.menkov at oracle.com
       
    Tue Jul 21 22:04:51 UTC 2020
    
    
  
Hi all,
please review the fix for
https://bugs.openjdk.java.net/browse/JDK-8249550
webrev:
http://cr.openjdk.java.net/~amenkov/jdk16/jdb_loopback/webrev/
some background:
https://bugs.openjdk.java.net/browse/JDK-8041435 made default listening 
on loopback address.
Later https://bugs.openjdk.java.net/browse/JDK-8184770 added handling of 
"*" address to listen on all addresses, but it didn't fixed "default" 
startListening() method (used by jdb through SunCommandLineLauncher).
The method called startListening(String localaddress, int port) with 
localaddress == null, but this method for null localladdress starts 
listening on all addresses (i.e. handle null value as "*").
The fix changes it to startListening(String address) which handles null 
address the same way as JDI socket connector does (i.e. listens on 
loopback address only)
--alex
    
    
More information about the serviceability-dev
mailing list