On Sun, 28 Jul 2024 09:48:21 GMT, Johan Sjölen <jsjo...@openjdk.org> wrote:

>> CmdLine::is_executable() looks wrong, surely an empty line is not executable.
>> 
>> With this change, in DCmd::parse_and_execute() we will avoid needlessly 
>> entering the code block to try and execute the command.
>> 
>> DCmd tests all good:
>> make images test TEST="test/hotspot/jtreg/serviceability/dcmd 
>> test/jdk/sun/tools/jcmd"
>
> Oh, and also, the output of my Python running:
> 
> 
> Connect
> None
> Sending payload
> None
> Sent
> Received response: -1
> java.lang.IllegalArgumentException: Unknown diagnostic command

Thanks Johan @jdksjolen and thanks David!

Yes good reminder that there can be multiple lines to process, and we have 
occasionally seen tools that emulate the attach protocol and send text.

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

PR Comment: https://git.openjdk.org/jdk/pull/20006#issuecomment-2255411003

Reply via email to