RFR: 8259577: Dangling reference to temp_path in Java_sun_tools_attach_VirtualMachineImpl_getTempDir

Kevin Walls kevinw at openjdk.java.net
Thu Mar 4 18:32:55 UTC 2021


Hi,
This is a pull request for 8259577, which points out that Java_sun_tools_attach_VirtualMachineImpl_getTempDir
caches a local variable from a previous call, so could return garbage.
However as noted in the bug, we have been safe so far because this method is only called once, so the caching is not required.
Thanks.

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

Commit messages:
 - 8259577: Dangling reference to temp_path in Java_sun_tools_attach_VirtualMachineImpl_getTempDir

Changes: https://git.openjdk.java.net/jdk/pull/2832/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2832&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8259577
  Stats: 10 lines in 1 file changed: 0 ins; 3 del; 7 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2832.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2832/head:pull/2832

PR: https://git.openjdk.java.net/jdk/pull/2832


More information about the serviceability-dev mailing list