RFR(S): 7171703: JNI DefineClass crashes client VM when first parameter is NULL

David Holmes david.holmes at oracle.com
Mon Jun 4 17:15:15 PDT 2012


Looks good. Thanks for tracking that down Fred - so 6990754 was the root 
cause.

I also satisfied my paranoia that the eventual call to:

     JvmtiExport::post_class_file_load_hook(name, class_loader,
                                            protection_domain,
                                            &ptr, &end_ptr,
                                            &cached_class_file_bytes,
                                            &cached_class_file_length);


in parseClassFile also anticipates that name might be null.

David
-----

On 5/06/2012 12:27 AM, Frederic Parain wrote:
> Greetings,
>
> This is a code review request for the following bug:
>
> 7171703: JNI DefineClass crashes client VM when first parameter is NULL
>
> Here's the URL for the webrev:
>
> http://cr.openjdk.java.net/~fparain/7171703/webrev.00/
>
> The JNI spec doesn't the implementation to be robust against NULL
> arguments, however, the HotSpot implementation of this method in JDK6
> was "accidentally" able to handle it. A code modification in JDK7
> has changed this behavior, causing some crashes to applications
> relying on the VM ability to handle a first NULL argument. This
> changeset just restores the JDK6 behavior to preserve the
> backward compatibility.
>
> Thanks,
>
> Fred
>


More information about the hotspot-runtime-dev mailing list