Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8220394

bufferedStream does not honor size limit

    Details

    • Subcomponent:
    • Resolved In Build:
      b23

      Backports

        Description

        bufferedStream, in its dynamic variant (where it is supposed to allocate its own buffer from C-Heap) can dynamically grow. It has a "bufmax" parameter which looks like it is supposed to be a limit to the buffer size (defaults to 10M).

        bufferedStream(size_t initial_bufsize = 256, size_t bufmax = 1024*1024*10);

        However, when growing the buffer it does not honor the bufmax cap. It just grows forever.

        That can lead to large memory usage or runaway memory leaks when printing, especially with faulty printing code.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stuefe Thomas Stuefe
                  Reporter:
                  stuefe Thomas Stuefe
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: