RFR 8087153: EXCEPTION_ACCESS_VIOLATION when CDS RO section vanished on win32

David Holmes david.holmes at oracle.com
Thu Jun 18 04:03:22 UTC 2015


+1 on all Dan's comments.

I think Windows only uses errno for the socket API.

David

On 18/06/2015 12:40 PM, Daniel D. Daugherty wrote:
> On 6/17/15 8:23 PM, Coleen Phillimore wrote:
>> Summary: use os::protect_memory() instead of calling
>> os::reserve_memory again
>>
>> We call mprotect or VirtualProtect on all of the platforms now rather
>> than calling reserve_memory again for the same area.   This is used to
>> make CDS read-only regions read-write if classes are redefined.
>>
>> This is actually Christian Tornqvist's fix with my encouragement and
>> testing on linux and solaris, and Misha's testing on windows.   We
>> tested jdi tests with -Xshare:on, including the tests for bug
>> https://bugs.openjdk.java.net/browse/JDK-8054386.
>>
>> open webrev at http://cr.openjdk.java.net/~coleenp/8087153.01/
>
> src/share/vm/runtime/os.hpp
>      No comments.
>
> src/share/vm/runtime/os.cpp
>      No comments.
>
> src/os/aix/vm/os_aix.cpp
>      No comments.
>
> src/os/bsd/vm/os_bsd.cpp
>      No comments.
>
> src/os/linux/vm/os_linux.cpp
>      No comments.
>
> src/os/solaris/vm/os_solaris.cpp
>      No comments.
>
> src/os/windows/vm/os_windows.cpp
>      No comments.
>
> src/share/vm/memory/filemap.cpp
>      L582:     fatal(err_msg("Unable to remap shared readonly space
> (errno=%d).", errno));
>          The above message should change a bit. Perhaps:
>
>          fatal(err_msg("Unable to change shared read-only space to
> read-write (errno=%d).", errno));
>
>          Also, don't know if 'errno' is set by os::protect_memory()
> everywhere.
>
> Dan
>
>
>> bug link https://bugs.openjdk.java.net/browse/JDK-8087153
>>
>> Thanks,
>> Coleen
>>
>>
>>
>


More information about the hotspot-runtime-dev mailing list