quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.67k stars 2.65k forks source link

Native image builds with `main` print a warning about `RecomputeFieldValue.ArrayIndexScale` #43797

Open zakkak opened 2 hours ago

zakkak commented 2 hours ago

Describe the bug

Since https://github.com/quarkusio/quarkus/pull/43648 got merged native-image compilation prints warnings like the following:

Warning: RecomputeFieldValue.ArrayIndexScale automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) was detected in the static initializer of org.jboss.threads.EnhancedQueueExecutor$RuntimeFields. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) for the array index scale computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store. 
Warning: RecomputeFieldValue.ArrayIndexScale automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) was detected in the static initializer of org.jboss.threads.EnhancedQueueExecutor$RuntimeFields. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayIndexScale(Class) for the array index scale computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store. 
Warning: RecomputeFieldValue.ArrayBaseOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) was detected in the static initializer of org.jboss.threads.EnhancedQueueExecutor$RuntimeFields. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) for the array base offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store. 
Warning: RecomputeFieldValue.ArrayBaseOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) was detected in the static initializer of org.jboss.threads.EnhancedQueueExecutor$RuntimeFields. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) for the array base offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store. 
Warning: RecomputeFieldValue.ArrayBaseOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) was detected in the static initializer of org.jboss.threads.EnhancedQueueExecutor$RuntimeFields. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) for the array base offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store. 
Warning: RecomputeFieldValue.ArrayBaseOffset automatic substitution failed. The automatic substitution registration was attempted because a call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) was detected in the static initializer of org.jboss.threads.EnhancedQueueExecutor$RuntimeFields. Detailed failure reason(s): Could not determine the field where the value produced by the call to jdk.internal.misc.Unsafe.arrayBaseOffset(Class) for the array base offset computation is stored. The call is not directly followed by a field store or by a sign extend node followed directly by a field store. 

See https://github.com/quarkusio/quarkus/actions/runs/11256143437/job/31312612207#step:16:399

Expected behavior

Build should succeed without warnings.

Actual behavior

Build succeeds with warnings.

How to Reproduce?

./mvnw -Dnative -pl integration-tests/main -Dnative.surefire.skip -Dformat.skip -Dno-descriptor-tests clean package

Output of uname -a or ver

No response

Output of java -version

21.0.4+7

Mandrel or GraalVM version (if different from Java)

23.1.4.0

Quarkus version or git rev

60f42105be07b48471509ac9498b605e573b06bb

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

quarkus-bot[bot] commented 2 hours ago

/cc @Karm (mandrel), @galderz (mandrel)