Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array rework #119

Merged
merged 12 commits into from
Nov 24, 2023
Merged

Array rework #119

merged 12 commits into from
Nov 24, 2023

Conversation

chriso
Copy link
Contributor

@chriso chriso commented Nov 23, 2023

This PR reworks our handling of arrays, to avoid reflect.ArrayOf and the risk of unbounded memory usage due to caching of reflect types. Each time an array (or slice/string with a backing array) is encountered, the serialization layer will create a reflect.Type to represent this array, and each (elemType,length) pair requires a new type.

This fixes #61.

@chriso chriso marked this pull request as ready for review November 23, 2023 23:10
@chriso chriso merged commit 0f55583 into main Nov 24, 2023
2 checks passed
@chriso chriso deleted the array-rework branch November 24, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

types: use of reflect.ArrayOf may cause unbounded memory utilization
2 participants