You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consuming a large amount of memory when unpacking huge Array and Map unexpectedly #657
There is a problem of unexpectedly consuming a large amount of memory when unpacking huge Array and Map.
For example, this code may causes an OutOfMemoryError.
As fix could have a threshold (similar to GRADUAL_ALLOCATION_THRESHOLD, but probably with a lower value), and if the length (respectively for map length * 2 (accounting for overflow)) is larger, collect in a new ArrayList<>(THRESHOLD) and then eventually call ArrayList#toArray?
Activity
Marcono1234 commentedon Oct 29, 2026
Maybe related to GHSA-cw39-r4h6-8j3x / daa2ea6.
As fix could have a threshold (similar to
GRADUAL_ALLOCATION_THRESHOLD, but probably with a lower value), and if the length (respectively for maplength * 2(accounting for overflow)) is larger, collect in anew ArrayList<>(THRESHOLD)and then eventually callArrayList#toArray?