Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 May 2016 15:38:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        java@FreeBSD.org
Subject:   [Bug 209599] Related to JDK-6934977 : MappedByteBuffer.load can SIGBUS/SIGSEGV if file is truncated java/openjdk8 and java/openjdk7
Message-ID:  <bug-209599-8522-fnGIfWRW2E@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-209599-8522@https.bugs.freebsd.org/bugzilla/>
References:  <bug-209599-8522@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209599

--- Comment #16 from Andrew Smith <iamasmith.home@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 chan=
ge
the handlers now raise the appropriate java exception rather than fatally
killing the vm.

root@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@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@testbuild1:~ #

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209599-8522-fnGIfWRW2E>