Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.6.0, 5.7.0
-
None
-
Mac
-
-
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.