[BUG]com.alibaba.fastjson2.util.FDBigInteger构造函数初始化的时候trimLeadingZeros方法死循环
Open
bug
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 问题描述
*在反序列化double类型时,com.alibaba.fastjson2.util.FDBigInteger构造函数在初始化时会使用到trimLeadingZeros方法,这个方法内部有个while操作导致cpu飙升*
### 环境信息
*请填写以下信息:*
- OS信息: [e.g.:CentOS 8.4.2105 4Core 3.10GHz 16 GB]
- JDK信息: [e.g.:Openjdk 1.8.0_312]
- 版本信息:[e.g.:Fastjson2 2.0.47]
Contributor guide
Research direction
Start with com.alibaba.fastjson2.util.FDBigInteger and inspect trimLeadingZeros during double deserialization. Reproduce the reported CPU spike with the available issue details, then verify that construction completes normally and add or update a regression test if the repository provides a relevant test location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100