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

Fix infinite loop due to integer overflow when reading large strings #1352

Merged
merged 6 commits into from
Oct 28, 2024

Conversation

pjfanning
Copy link
Member

@pjfanning pjfanning commented Oct 27, 2024

see #1350

I had to set a very large Xmx (eg -Xmx24G) to get the test to run and that's after I rewrote the test in #1350 to cut down on the memory needed.

@cowtowncoder cowtowncoder added the 2.17 Issues planned (at earliest) for 2.17 label Oct 27, 2024
@cowtowncoder
Copy link
Member

@pjfanning Agree wrt 2.17 branch: while seems like a rare case (*), if it happens, result is pretty bad. So it getting fixed for 2.17.3 would be great.

I hope to get this reviewed and merged ASAP, within time constraints I have on my end.

(*) given also that I think it may well fail for other reason for text segment over 2 gigs, due to Java's limits on String and array lengths.

@cowtowncoder cowtowncoder changed the title handle int overflow issue that can cause infinite loops Fix infinite loop due to integer overflow when reading large strings Oct 28, 2024
@cowtowncoder cowtowncoder merged commit 7db88c1 into FasterXML:2.17 Oct 28, 2024
5 checks passed
@pjfanning pjfanning deleted the int-overflow branch October 28, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.17 Issues planned (at earliest) for 2.17
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants