Greetings: I posted a webrev image: http://cr.openjdk.java.net/~jzavgren/8008107/webrev.01/, of a change that I made to the native source code file: jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c
There is a block of code in this file, around line 685, that attempts to free memory after an exception has been detected. The original code frees memory at the address of the pointer: ckParam.pReturnedKeyMaterial, then it frees memory at the address: ckParam.pReturnedKeyMaterial->pIVClient, that is pointed to by the same freed pointer. After the original memory location is freed, the pointer is no longer valid. I fixed the problem by reversing the order in which these two memory segments are freed. Thanks! John Zavgren