Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4375

TMemory throw bad_alloc due to counter overflow

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.11.0
    • Component/s: C++ - Library
    • Labels:
      None
    • Environment:

      Linux 64 bits rhel 7.3

    • Flags:
      Important

      Description

      The buffer size named buffer size_ is stored on a uint32_t.
      When the size of transmis data is above there is an overflow and throw a bad_alloc error.

      This come from the fact that the allocated size is a power of 2 and is multiplied by 2. At a time it reach 2^32 and ask for allocating a buffer with size 0.
      Then the allocation return NULL (normal) and the exception is throw.

      Thanks to take into account the issue.

        Attachments

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              jnquintin Jean-Noël Quintin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: