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

building with -qt-zlib causes runtime failure

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.8.0
    • 4.7.0
    • Other
    • None
    • 64-bit linux with zlib 1.2.5
    • 424b2ed0ab3f683291ff99933c36397d9be49a4d

      Statically compiling the zlib (version 1.2.3) from the Qt repository into QtCore can lead to a crash when system libraries (such as libxml2) that link dynamically against zlib 1.2.4 or newer try to use zlib functions.

      The problem is that new functions have been added to zlib in 1.2.4 (gzopen64 etc.) and the new zlib header defines gzopen to gzopen64 when possible. So when libxml2 calls gzopen, it will call gzopen64 from the shared library. Other functions, such as gzread, do not have new variants and are thus resolved to the version from QtCore.

      Mixing the new gzopen64 with the old gzread does not work correctly, so gzread will always fail.

      Suggestion: Update the zlib in the Qt repository.

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

            vgt Eirik Aavitsland
            ckamm Christian Kamm
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes