RFR(S): 8217345: [TESTBUG] JFR TestShutdownEvent fails due to improper use of Unsafe

mikhailo.seledtsov at oracle.com mikhailo.seledtsov at oracle.com
Tue Jan 22 21:37:13 UTC 2019


Summary of the problem:
   - root cause is the improper use of Unsafe
   - the problem did not manifest when simply running the test; if test 
is ran with an option "--limit-modules=java.base,jdk.jfr" then it fails

Solution:
   updated to correctly use Unsafe: 
http://cr.openjdk.java.net/~mseledtsov/8217345.00/
      - using jdk.internal.misc.Unsafe instead of sun.misc.unsafe
      - using "--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED" 
for child process


JBS: https://bugs.openjdk.java.net/browse/JDK-8217345
Webrev: http://cr.openjdk.java.net/~mseledtsov/8217345.00/
Testing:
     tested with and w/o  "--limit-modules=java.base,jdk.jfr" multiple 
times on Linux-x64, Mac, Win-x64 and Solaris-Sparc


Thank you,
Misha



More information about the hotspot-jfr-dev mailing list