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

Mac: Crash on some machine after QApplication.exec() returns

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.6.2, 5.7.1
    • 5.6.0, 5.7.0
    • Core: Date/Time
    • None
    • Mac
    • macOS
    • f8dc769655959b290d70a2e66e2c3a625aa813cd

    Description

      This is only reproducible on some macbook pro machine.

      When Qt applcation quits there is Apple crash dialog appears after main() returns.

      It was found that line 61 of qtimezoneprivate_mac.mm is probably causing the problem, the default constructor of the QMacTimeZonePrivate class neglects to initialize m_nstz to 0 (compare with the other constructors that do initialize m_nstz to 0)

      Crash stack attached.

      The result is that when init() is called by the constructor, if availableTimeZoneIds() doesn't contain (ianaId), then the value of m_nstz will remain undefined, and causing undefined behavior and memory corruption when the pointer is dereferenced later on.

      Probable fix is to make sure that the QMacTimeZonePrivate default constructor does initialize m_nstz to zero as part of its initializer list.

      Attachments

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

        Activity

          People

            tpochep Timur Pocheptsov
            irfan.omair@digia.com Irfan Omair
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes