Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-516

[proton-c] Dispatcher frame buffer set to peer's max frame size.

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.6
    • proton-0.8
    • proton-c
    • None

    Description

      The size of the output frame buffer used by the Transport is set unconditionally to the max frame size advertised by the peer:

      In transport.c::int pn_do_open(pn_dispatcher_t *disp):

      pn_buffer_ensure( disp->frame, disp->remote_max_frame );

      This can potentially exhaust memory on small memory systems (eg, embedded devices). Instead, the output frame buffer should grow as needed based on the size of the payloads generated, limited by the remote_max_frame value.

      And, of course, pn_buffer_ensure + caller should handle realloc failures instead of ignoring them.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            astitcher Andrew Stitcher
            kgiusti Ken Giusti
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment