JDK-8162458 : Buffer view implementations use incorrect offset for Unsafe access
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-07-25
  • Updated: 2020-09-01
  • Resolved: 2016-07-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b131Fixed
Related Reports
Relates :  
Relates :  
Description
JDK-8151163 updated the buffer implementations to use the Unsafe unaligned accessors.

The offset calculation is incorrect. Care also needs to be take to work correctly for heap and direct buffers, specifically for the ByteBufferAs* implementations that leverage an absolute offset to the byte array or address respectively.
Comments
verified in b139
12-10-2016

Marked as an integration blocker to keep JDK-8151163 from leaving JDK9-hs in its current state.
28-07-2016

http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8162458-byte-buffer-view-offset-access-incorrect/webrev/
25-07-2016