jline/jline3

StackOverflowError when running inside container

VerKWer opened this issue · 0 comments

Calling LineReaderImpl.redisplay when running in a container started via compose can trigger infinite recursion, eventually throwing a StackOverflowError.

The underlying cause is that under those conditions, LineReaderImpl.size.getRows() is 0. This is a problem because redisplay can eventually call doList, where a certain condition is then always true and the taken branch calls redisplay again.

This does not seem to affect containers started directly via docker run (rather than compose) and the terminal size is set correctly there.

Minimal example to reproduce the issue: https://github.com/VerKWer/jline3-stack-overflow