Repost: RFR (S) JDK-6311046: -Xcheck:jni should support checking of GetPrimitiveArrayCritical

Zhengyu Gu zhengyu.gu at oracle.com
Tue May 27 20:27:16 UTC 2014


Change looks good. I am so glad that you cleanup 
os::malloc()/os::free(), it looks so much better.

One thing:  you probably want to add comment or assertion on 
GuardHeader, that change the size of the class can impact user memory 
alignment ...

Thanks,

-Zhengyu


On 5/15/2014 7:58 AM, David Simms wrote:
> Gidday all:
>
> Bug/Enhancement: https://bugs.openjdk.java.net/browse/JDK-6311046
>
> Web review: http://cr.openjdk.java.net/~dsimms/6311046/rev4/
>
> Cleaned up the "hand rolled" memory bounds checking in 
> os::malloc/realloc/free and type checking in checked JNI (GetString*), 
> and unified into a single helper class "GuardedMemory". Added some 
> extra checks to checked JNI (release mode).
>
> There is now some extra debugging support for free/release operations, 
> GuardedMemory::release_for_freeing()" will now mark user bytes with 
> "freeBlockPad", which did yield a result when testing.
>
> Testing Completed:
>
> Ran on all platforms:
>
>  * JPRT
>  * jteg jdk_core & jdk_svc
>  * "RT nightly".
>
>
> Cheers
> /David Simms



More information about the hotspot-runtime-dev mailing list