8263403: [JVMCI] output written to tty via HotSpotJVMCIRuntime can be garbled

Reviewed-by: kvn, never
This commit is contained in:
Doug Simon 2021-03-11 20:56:36 +00:00
parent b92abac262
commit f3bd801a86

View File

@ -920,7 +920,7 @@ public final class HotSpotJVMCIRuntime implements JVMCIRuntime {
Unsafe unsafe = UnsafeAccess.UNSAFE;
long buffer = unsafe.allocateMemory(length);
try {
unsafe.copyMemory(bytes, vm.ARRAY_BYTE_BASE_OFFSET, null, buffer, length);
unsafe.copyMemory(bytes, Unsafe.ARRAY_BYTE_BASE_OFFSET, null, buffer, length);
vm.writeDebugOutput(buffer, length, flush);
} finally {
unsafe.freeMemory(buffer);