RFR 8191278: MappedByteBuffer bulk access memory failures are not handled gracefully

Harold Seigel harold.seigel at oracle.com
Tue Mar 5 14:51:20 UTC 2019


Hi Coleen,

Thanks for reviewing this!

See comments inline.

On 3/1/2019 6:22 PM, coleen.phillimore at oracle.com wrote:
>
> http://cr.openjdk.java.net/~hseigel/bug_8191278/webrev/src/hotspot/share/prims/unsafe.cpp.frames.html 
>
>
> 448 GuardUnsafeAccess guard(thread);
>
>
> I can't find 'thread' in this scope.  Does line 433 need to be in the 
> scope above it?

The JVM_ENTRY_FROM_LEAF at line 440 defines 'thread':

    #define JVM_ENTRY_FROM_LEAF(env, result_type, header)                \
       { { \
         JavaThread* thread=JavaThread::thread_from_jni_environment(env); \
         ThreadInVMfromNative __tiv(thread);                              \
         debug_only(VMNativeEntryWrapper __vew;)                          \
         VM_ENTRY_BASE_FROM_LEAF(result_type, header, thread)

>
> 150 /**
> 151 * Helper class to wrap memory accesses in 
> JavaThread::doing_unsafe_access()
> 152 */
>
> Can you use // comments here?
Done
>
> http://cr.openjdk.java.net/~hseigel/bug_8191278/webrev/test/hotspot/jtreg/runtime/Unsafe/InternalErrorTest.java.html 
>
>
>   33  *   @build sun.hotspot.WhiteBox
>
>
> Can you fix the indentation here?

Done.


Thanks, Harold

>
> I don't see the compiler changes.
>
> Coleen
>
> On 2/28/19 3:22 PM, Harold Seigel wrote:
>> Hi,
>>
>> Please review this fix for JDK-8191278.  The fix uses the 
>> GuardUnsafeAccess class in unsafe.cpp so that the signal handler will 
>> know to convert SIGBUS signals to exceptions.
>>
>> The compiler related changes and much of the test were written by 
>> Jamsheesh (jcm).
>>
>> Open Webrev: 
>> http://cr.openjdk.java.net/~hseigel/bug_8191278/webrev/index.html
>>
>> JBS Bug:  https://bugs.openjdk.java.net/browse/JDK-8191278
>>
>> The fix was tested on Linux x64, Mac OS, Solaris Sparc, and Windows.  
>> Testing was not done on the other platforms changed by this fix.
>>
>> The fix was regression tested by running Mach5 tiers 1 and 2 tests 
>> and builds on Linux x64, Solaris, Windows, and Mac OS X, by running 
>> Mach5 tiers 3 -5 on Linux x64, and by running JCK-13 Lang and VM 
>> tests on Linux x64.
>>
>> Thanks, Harold
>>
>


More information about the hotspot-dev mailing list