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

Array initialization error in TLS code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • None
    • 5.15.6, 5.15.7, 5.15.16, 5.15.17
    • WebEngine
    • None
    • Ubuntu 22.04 LTS/Mint
      Clang 15 built from source
    • Linux/X11

    Description

      When compiled with Clang 15, the build stops at file {{qtwebengine/src/3rdparty/chromium/sandbox/linux/services/credentials.cc }}where the following line 101 exists:

      char tls_buf[PTHREAD_STACK_MIN] = {0};

      Clang reports in place initialization error because the PTHREAD_STACK_MIN macro is considered a variable:

      qtwebengine/src/3rdparty/chromium/sandbox/linux/services/credentials.cc:101:16: error: variable-sized object may not be initialized

      The workaround is to replace this line with two followings:

        char tls_buf[PTHREAD_STACK_MIN];
        memset(tls_buf, 0, PTHREAD_STACK_MIN);

      Attachments

        1. credentials.cc
          11 kB
          Andrei Vukolov
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            twdragon Andrei Vukolov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes