Hi,

as described in https://bugs.openjdk.java.net/browse/JDK-8200579 it could be 
useful to be able to specify an already existing 'file' to be able to stream 
the heap dump directly to a named pipe on Windows or a tty or domain socket on 
Unix, especially on systems with low disk space. Since we now don't have the 
requirement to seek anymore, when we open the file with 
os::create_binary_file(<path>, true) instead of os::create_binary_file(<path>, 
false) we could just do that.

However, I'm not sure how this would be feasible from a security perspective, 
since this would allow users who have the permission to trigger a heap dump to 
overwrite files. One could check if the opened file is one of the special types 
(pipes, tty, domain sockets) and allow it only for these cases.

What do you think?

Best regards,
Ralf

Reply via email to