The ap01t001 test creates six extra instances of the tested class, let them die, and then checks that it gets exactly six ObjectFree callbacks. The problem is that this is verified in the VMDeath callback and at that point the instance has gone out-of-scope and and a seventh ObjectFree event has been triggered.
My proposed fix is to ensure that the test instance is kept alive. ------------- Commit messages: - 8256337: ap01t001.cpp, 67: Received unexpected number of ObjectFree events: 7 Changes: https://git.openjdk.java.net/jdk/pull/1204/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1204&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8256337 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/1204.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/1204/head:pull/1204 PR: https://git.openjdk.java.net/jdk/pull/1204