alibaba / alibaba/fastjson2

graalvm 打包问题FieldOffset自动替换失败。由于在com.alibaba.fastjson2.util.JDKUtils的静态初始化器中检测到对sun.misc.Unsafe.objectFieldOffset(Field)的调用,因此尝试进行自动替换注册。详细的失败原因:无法确定调用sun.misc.Unsafe.objectFieldOffset(field)计算字段偏移量时产生的值存储在哪个字段

Open
#3,137 5 comments 0 reactions 1 assignee Claimed by @wenshao View on GitHub
bug
Dominant language
Java
Stars
4.4k
Forks
613
Avg merge
1d 22h
Merged PRs (30d)
6

Description

RecomputeFieldValue.FieldOffset automatic substitution failed. The automatic substitution registration was attempted because a call to sun.misc.Unsafe.objectFieldOffset(Field) was detected in the static initializer of com.alibaba.fastjson2.util.JDKUtils. Detailed failure reason(s): The argument of sun.misc.Unsafe.objectFieldOffset(java.lang.reflect.Field) is not a constant value or a field load that can be constant-folded., Could not determine the field where the value produced by the call to sun.misc.Unsafe.objectFieldOffset(Field) for the field offset computation is stored.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.