Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.7.0
-
Windows
Description
When reading a long line (128mb+) from a file with QTextReader, the 32bit application crashes with bad alloc. 64bit application does not crash in this situation.
The stacktrace of crash is:
1 RaiseException KERNELBASE 0x7576c54f
2 CxxThrowException VCRUNTIME140D 0xf5990a2
> 3 qBadAlloc qglobal.cpp 3044 0x66ada83c
4 QString::reallocData qstring.cpp 1772 0x66ba5026
5 QString::resize qstring.cpp 1686 0x66b9df04
6 QString::setUnicode qstring.cpp 4853 0x66ba4403
7 QTextStream::readLineInto qtextstream.cpp 1729 0x66c76283
8 QTextStream::readLine qtextstream.cpp 1680 0x66c76182
9 main main.cpp 12 0x11e1540
Steps to reproduce:
- Run attached sample
- EXPECTED: Line is properly read from the file
- ACTUAL: Application crashes
Attachments
Issue Links
- relates to
-
QTBUG-45190 Add QTextStream::read|readAll|readLine(QString *) overloads to reuse QString's capacity
- Open