Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Do not grow line buffer in slurp unbounded #1123
If a program created by
To prevent OOMEs we put an upper bound on the number of lines we're
If a program created by `process.slurp` outputs a lot of lines, the internal line buffer can grow until there is no more available heap space and an OOME occurs. I've observed this with a Scalafix migration that printed a lot of stack traces. To prevent OOMEs we put an upper bound on the number of lines we're storing by using the new `appendBounded`.
@@ Coverage Diff @@ ## master #1123 +/- ## ========================================== + Coverage 66.08% 66.13% +0.04% ========================================== Files 95 95 Lines 1489 1491 +2 Branches 36 42 +6 ========================================== + Hits 984 986 +2 Misses 505 505