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

@jdksjolen - thank you! IIUC from your report, our own code may never have an 
empty CmdLine but you can directly inject one using the communication protocol. 
In that case we the fix is good as-is. A test case would be nice but not if we 
need to use python.

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

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

Reply via email to