Details
-
Suggestion
-
Resolution: Fixed
-
P4: Low
-
5.14.0, 5.15.0, 6.0, 6.4
-
None
-
-
43108bc6fa76e46c402cbfca7c05d14b977d3060 (qt/qtbase/dev)
Description
In contrast to other platforms on Windows it's not possible to activate valgrind. A great solution for MSVC would be to just use the CRT-Library with
#define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h>
Unfortunately that doesn't compile. The reason is, that with CRT-Library uses #define to replace malloc, realloc, and free by their debug-version; but the Qt sources contain methods whose names coincide with these standard library functions in some places:
- In QList's QListData has a realloc method. It's private and undocumented: all references are in your hands. It's just a minor refactoring.
- In QVarLengthArray first: it's just a private method. No problem to refactor this also.
- In QVarLengthArray second: it's a template seems to be used internally and undocumented. May be reachable from outside.
- New since 5.14 there is a method realloc in QVector.
Can't these usages just be renamed to remove the problems?
(Remark: I know there's another ticket to this topic but it's from 2014 and down-voted in priority – no one looks at it. This case is way more substantial than that ticket reflects!)
Attachments
Issue Links
- is duplicated by
-
QTBUG-115235 Routine name 'free' conflicts with Visual Studio leak detection
- Closed
- resulted from
-
QTBUG-80311 Reimplement QHash using faster algorithm
- Closed