Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11176

Memory leak in ClientCacheHelper

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • Impala 4.0.0, Impala 3.4.0
    • Impala 4.1.0
    • Backend
    • ghx-label-6

    Description

      ClientCacheHelper::CreateClient uses a function pointer "factory_method" to create a new ThriftClientImpl object and store it in a share pointer of type ThriftClientImpl.

      However, in the implementation of the function pointer, which uses ClientCache::MakeClient, it creates a derived object of ThriftClientImpl and return the pointer as the base object pointer ThriftClientImpl*. When the ClientCacheHelper::CreateClient uses the returned pointer to create a base shared pointer, it can't recognize that the pointer is from a derived object, therefore something goes wrong that the shared pointer couldn't release all the memory occupied by the derived object.

      Attachments

        Issue Links

          Activity

            People

              baggio000 Yida Wu
              baggio000 Yida Wu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: