Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
6.8.0
Description
In a situation where user has to mix release and debug due to some third party library(to avoid asserts) QArrayDataPointer destructor crashes.
In Destructor of class QArrayDataPointer. It calls free function to the data pointer in the header file, and that uses the Debug version of CRT. But as the data pointer was allocated with the Release version of CRT in the Qt release libraries, it won't be freed correctly and causes the crashes.
This should be caused by https://github.com/qt/qtbase/commit/a956b7a9b7dc5329ac1466c21dc74d471e7ca6f1#diff-e2c99ce0071f693320970cb5a1c248544a7ce1fd94bc280cd41015daf426437bR95, which replaces Data::deallocate with free. A simple fix can be just to move this call of free into somewhere in a cpp file, so that it can be compiled into the Qt libraries and use the same Release version of CRT as allocate