Ping... Any suggestions? Thanks, Felix
> -----Original Message----- > From: Yangfei (Felix) > Sent: Wednesday, July 8, 2020 11:35 AM > To: core-libs-dev@openjdk.java.net > Subject: RFR(S): 8248910: NPE when freeing the memory for a slice from a > buffer > > Hi, > > Bug: https://bugs.openjdk.java.net/browse/JDK-8248910 > Webrev: http://cr.openjdk.java.net/~fyang/8248910/webrev.00/ > > The overall procedure is described by the newly add test. > For a slice from a ByteBuffer, it does not have a cleaner, which leads to > the > NPE. > Here, I thinks we should not try to free the memory of a slice. > Proposed fix adds a null check for cleaner in Util.free before invoking > its > clean() method. > Another possible way would be catching slice in Util. > releaseTemporaryDirectBuffer and exclude it. > > Tier1-3 tested on x86_64-linux-gnu. Newly add test fail without the fix > and > pass otherwise. > Comments? > > Thanks, > Felix