Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
6.0.0 Beta4
-
Ubuntu 20.04 LTS 64 bit
clang 10.0.0
Built with qmake
-
9a55f40937d037d06e00b09465d8dad0554692fc (qt/qtbase/dev) 3caacb2f2bbd3947f79d9351b7c9af4517271875 (qt/qtbase/6.0)
Description
- To visualize the problem without a debugger or memory limits, add the attached patch.
It just adds a qDebug() to show which value is being passed into QByteArray::resize(). - Build Qt with that patch.
- Build the attached project on this build of Qt.
- Run the resulting program with the attached input.
You'll see:Allocating 1 Allocating 2147483641
Allocating 2 GiB of memory doesn't seem appropriate for an 8 byte file.
This is a regression from Qt 5.15. There, you'll only see:
Allocating 1
Attachments
Issue Links
- relates to
-
QTBUG-88256 [REG 5.15 -> 6.0] QCborValue::fromCbor allocates 2 GiB for 8 B input
- Closed