[lworld] RFR: 8352647: [lworld] Remove larval InlineTypeNode in Unsafe intrinsics
Jatin Bhateja
jbhateja at openjdk.org
Fri Mar 28 08:45:56 UTC 2025
On Wed, 26 Mar 2025 14:10:30 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> I just had a look at https://github.com/openjdk/valhalla/pull/1405, thanks for working on this @merykitty.
>>
>>> so that larval objects do not cross call boundaries except for invoking object constructors
>>
>> But this will not prevent users from passing larval objects created via `makePrivateBuffer` to other methods, right? I.e., we still have the issues described in [JDK-8239003](https://bugs.openjdk.org/browse/JDK-8239003) (and linked issues).
>
> @TobiHartmann
>
>> But this will not prevent users from passing larval objects created via makePrivateBuffer to other methods, right? I.e., we still have the issues described in [JDK-8239003](https://bugs.openjdk.org/browse/JDK-8239003) (and linked issues).
>
> My stance on this matter is that we should simply disallow passing larval objects except to `Unsafe::putXXX` and `Unsafe::finishPrivateBuffer`. What do you think?
Hi @merykitty ,
For attached test case I am seeing crash at state merge point b/w larval and non-larval value
[unsafe_access.txt](https://github.com/user-attachments/files/19501609/unsafe_access.txt)
CPROMPT>javac --enable-preview -source 25 --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED unsafe_access.java
Note: unsafe_access.java uses preview features of Java SE 25.
Note: Recompile with -Xlint:preview for details.
CPROMPT>
CPROMPT>java -XX:-PauseAtStartup --enable-preview --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED -cp . unsafe_access
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/jatinbha/sandboxes/lworld/src/hotspot/share/opto/parse1.cpp:1790), pid=2453805, tid=2453825
# assert(gvn().type(n)->is_zero_type()) failed: Should have been scalarized
#
# JRE version: OpenJDK Runtime Environment (25.0) (slowdebug build 25-internal-adhoc.root.lworld)
# Java VM: OpenJDK 64-Bit Server VM (slowdebug 25-internal-adhoc.root.lworld, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x178efa5] Parse::merge_common(Parse::Block*, int)+0x49f
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/jatinbha/code/java/valhalla/core.2453805)
#
# An error report file with more information is saved as:
# /home/jatinbha/code/java/valhalla/hs_err_pid2453805.log
10001399990
#
# Compiler replay data is saved as:
# /home/jatinbha/code/java/valhalla/replay_pid2453805.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
-------------
PR Comment: https://git.openjdk.org/valhalla/pull/1406#issuecomment-2760570153
More information about the valhalla-dev
mailing list