Skip to content

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

Merged
cowtowncoder merged 6 commits into
FasterXML:2.17from
pjfanning:int-overflow
Oct 28, 2024
Merged

Fix infinite loop due to integer overflow when reading large strings#1352
cowtowncoder merged 6 commits into
FasterXML:2.17from
pjfanning:int-overflow

Conversation

@pjfanning

@pjfanning pjfanning commented Oct 27, 2024

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown
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
@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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants