Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79524

Memory leak in Mac Proxy detection when a PAC file is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.13.1
    • Network: Proxies
    • None
    • MacOS 10.14.6 Mojave
    • macOS
    • 7ac3bc9f830a8ea1ebdf4738e883bdc01522c31f (qt/qtbase/5.15)

    Description

      Whenever QNetworkProxyFactory::systemProxyForQuery is called on MacOS a memory leak occurs. This can be easily tested with the attached sample application and running it with  leaks --atExit this results in following leak report:

      Querying proxy for https://www.qt.io/adfsda
      {{ Query returned 1 proxies}}
      {{ {{ Type: HttpProxy Proxy: 192.168.50.153:3128 (Credentials: }}}}
      {{ Process: proxy_test [38800]}}
      {{ Path: /Users/USER/*/proxy_test}}
      {{ Load Address: 0x10418b000}}
      {{ Identifier: proxy_test}}
      {{ Version: ???}}
      {{ Code Type: X86-64}}
      {{ Parent Process: leaks [38799]Date/Time: 2019-10-24 16:15:16.920 +0200}}
      {{ Launch Time: 2019-10-24 16:15:16.797 +0200}}
      {{ OS Version: Mac OS X 10.14.6 (18G103)}}
      {{ Report Version: 7}}
      {{ Analysis Tool: /usr/bin/leaksPhysical footprint: 1624K}}
      {{ Physical footprint (peak): 1624K}}
      {{ ----leaks Report Version: 4.0}}
      {{ Process 38800: 1274 nodes malloced for 273 KB}}
      {{ Process 38800: 12 leaks for 864 total leaked bytes.12 (864 bytes) ROOT LEAK: <CFDictionary 0x7fb0a2c014c0> [64] item count: 7}}
      {{ {{ 8 (592 bytes) <CFDictionary (Value Storage) 0x7fb0a2c013b0> [112]}}}}
      {{ {{ 6 (416 bytes) <CFDictionary 0x7fb0a2c00a20> [64] item count: 1}}}}
      {{ {{ 4 (320 bytes) <CFDictionary (Value Storage) 0x7fb0a2c01320> [32]}}}}
      {{ {{ 3 (288 bytes) <CFDictionary 0x7fb0a2c00e50> [64] item count: 6}}}}
      {{ {{ 1 (112 bytes) <CFDictionary (Key Storage) 0x7fb0a2c00de0> [112]}}}}
      {{ {{ 1 (112 bytes) <CFDictionary (Value Storage) 0x7fb0a2c01500> [112]}}}}
      {{ {{ 1 (32 bytes) <CFDictionary (Key Storage) 0x7fb0a2c00a60> [32]}}}}
      {{ {{ 1 (64 bytes) <CFArray 0x7fb0a2c00ae0> [64] item count: 2}}}}
      {{ {{ 3 (208 bytes) <CFDictionary (Key Storage) 0x7fb0a2c01420> [112]}}}}
      {{ {{ 1 (48 bytes) <CFString 0x7fb0a2c01590> [48] length: 21 "ProxyAutoConfigEnable"}}}}
      {{

      Unknown macro: { Unknown macro}

      }}}

      Note: this only happens if the system proxy settings have automatic proxy configuration enabled using a .pac file!

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            mfleisz Martin Fleisz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes