[Bug 209599] Related to JDK-6934977 : MappedByteBuffer.load can SIGBUS/SIGSEGV if file is truncated java/openjdk8 and java/openjdk7

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 20 15:38:19 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209599

--- Comment #16 from Andrew Smith <iamasmith.home at gmail.com> ---
The patches attached simply add in SIGSEGV as a possible signal that needs to
be handled as the exception whilst using sun.misc.Unsafe functions.

The original implementation had handlers for SIGBUS only and with this change
the handlers now raise the appropriate java exception rather than fatally
killing the vm.

root at testbuild1:~ # /usr/local/openjdk8/bin/java -cp . Truncate
java.lang.InternalError: a fault occurred in a recent unsafe memory access
operation in compiled Java code
        at java.nio.MappedByteBuffer.load(MappedByteBuffer.java:175)
        at Truncate$2.call(Truncate.java:70)
        at Truncate$2.call(Truncate.java:68)
        at Truncate$3.run(Truncate.java:85)
        at java.lang.Thread.run(Thread.java:745)
root at testbuild1:~ # /usr/local/openjdk7/bin/java -cp . Truncate
java.lang.InternalError: a fault occurred in a recent unsafe memory access
operation in compiled Java code
        at java.nio.MappedByteBuffer.load(MappedByteBuffer.java:175)
        at Truncate$2.call(Truncate.java:70)
        at Truncate$2.call(Truncate.java:68)
        at Truncate$3.run(Truncate.java:85)
        at java.lang.Thread.run(Thread.java:745)
root at testbuild1:~ #

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-java mailing list