-
-
Notifications
You must be signed in to change notification settings - Fork 797
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
Got NegativeArraySizeException
when calling writeValueAsString()
#1012
Comments
Can you provide a test case? - it would speed this along |
Yes I'm working on it |
Minimal Test case that reproduce the issue added |
I debugged the test case and the issue is that the TextBuffer gets too big. StringBuilder will only support Integer.MAX_VALUE chars (approx 2Gb in utf-8 or ascii - 1 byte per char). @cowtowncoder the There is little benefit to making _segmentSize a long because in the end |
This is basically the same issue as #351 |
I modified my test to write to a |
NegativeArraySizeException
when calling writeValueAsString()
Ok, will merge the fix. Thank you @pjfanning for the fix, @klettier for reporting it! |
Hi,
I'm serializing an object containing
15M
values2.14.2
Stack trace
Looks like an
int
overflow somewhere in TextBuffer 👀Minimal test case that reproduce the issue
Result
The text was updated successfully, but these errors were encountered: