-
Bug
-
Resolution: Fixed
-
P3
-
8, 11, 16, 17, 18, 19
-
b16
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8284271 | 18.0.2 | Tobias Hartmann | P3 | Resolved | Fixed | b02 |
JDK-8283827 | 17.0.4-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b01 |
JDK-8284081 | 17.0.4 | Martin Doerr | P3 | Resolved | Fixed | b01 |
JDK-8284055 | 11.0.16-oracle | Tobias Hartmann | P3 | Resolved | Fixed | b02 |
JDK-8284519 | 11.0.16 | Goetz Lindenmaier | P3 | Resolved | Fixed | b01 |
byte[] array = new byte[size];
int offset = unsafe.arrayBaseOffset(byte[].class);
for (int i = offset; i < offset + size; i++) {
unsafe.putByte(array, i, fill);
}
Crash report
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000ffffb60c5988, pid=2413836, tid=2413852
#
# JRE version: OpenJDK Runtime Environment (19.0) (fastdebug build 19-internal-adhoc.penli01.jdksrc)
# Java VM: OpenJDK 64-Bit Server VM (fastdebug 19-internal-adhoc.penli01.jdksrc, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x6c5988] AddPNode::bottom_type() const+0x78
#
# Core dump will be written. Default location: /tmp/core.2413836
#
# An error report file with more information is saved as:
# /tmp/scratch/0/hs_err_pid2413836.log
#
# Compiler replay data is saved as:
# /tmp/scratch/0/replay_pid2413836.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
The crash is caused by a NULL pointer issue when doing loop intrinsify_fill optimization for unsafe fill patterns. Although this only occurs with unsafe call, we still think it's better to fix that because such unsafe call is used in a correct way.
Note that this can be reproduced on AArch64 with default VM options. On x86, it's reproducible with additional option "-XX:+OptimizeFill" which is turned off by default.
- backported by
-
JDK-8283827 Fix a C2 crash when filling arrays with unsafe
- Resolved
-
JDK-8284055 Fix a C2 crash when filling arrays with unsafe
- Resolved
-
JDK-8284081 Fix a C2 crash when filling arrays with unsafe
- Resolved
-
JDK-8284271 Fix a C2 crash when filling arrays with unsafe
- Resolved
-
JDK-8284519 Fix a C2 crash when filling arrays with unsafe
- Resolved
- duplicates
-
JDK-8316954 crash with Problematic frame: # V [libjvm.so+0x3ba568] AddPNode::bottom_type() const+0x158
- Closed
- relates to
-
JDK-8247307 C2: Loop array fill stub routines are not called
- Resolved
- links to
-
Commit openjdk/jdk11u-dev/5a66c8e9
-
Commit openjdk/jdk17u-dev/9c3124a6
-
Commit openjdk/jdk18u/29c7f1c4
-
Commit openjdk/jdk/a6740c01
-
Review openjdk/jdk11u-dev/1015
-
Review openjdk/jdk17u-dev/306
-
Review openjdk/jdk18u/58
-
Review openjdk/jdk/7884