(2.0.39 和 2.0.40)JSONObject中的long超长,序列化时导致OOM
Open
bug
- Dominant language
- Java
- Stars
- 4.4k
- Forks
- 613
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 6
Description
### 问题描述
2.0.39和2.0.40 中出现的问题 (2.0.38不存在该问题)
JSONObject中的long超长,如 long var = 1694541292077;
序列化时导致OOM,JSON.toJSONString(jsonObject)
可能出在:
IOUtils.java中 public static int writeInt64(final char[] buf, int pos, final long value) {}
Contributor guide
Research direction
Reproduce the problem with JSONObject and JSON.toJSONString using the long value shown, then inspect IOUtils.java and its writeInt64 method. Compare behavior between 2.0.38 and 2.0.39 or 2.0.40; done means the value serializes correctly without exhausting memory.
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
- 35/100