Repost: RFR (S) JDK-6311046: -Xcheck:jni should support checking of GetPrimitiveArrayCritical
David Simms
david.simms at oracle.com
Wed Jun 4 11:49:58 UTC 2014
Thanks Frederic !
Will make a few small updates based on your feedback.
Still looking for 'R'eviewer
On 2014-06-04 12:13, Frederic Parain wrote:
> Hi David,
>
> Thank you for improving JNI safety.
>
> src/share/vm/prims/jni.cpp
> no comment
>
> src/share/vm/prims/jniCheck.cpp
> line 348, 1415 and 1486: the code checks
> both that guards have not been corrupted
> and the consistency of the tag word, but
> the error message seems to address only
> the tag word consistency check. Is is
> possible to have two distinct error
> messages here?
>
> src/share/vm/runtime/os.cpp
> Nice cleanup!
> Why #include "memory/guardedMemory.hpp"
> is pushed down to line 527 instead of
> being at beginning of the file with
> other includes?
>
> src/share/vm/memory/guardedMemory.cpp
> no comment
>
> src/share/vm/memory/guardedMemory.hpp
> no comment
>
> Regards,
>
> Fred
>
> On 15/05/2014 13:58, 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