Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
5.15.9
-
None
Description
Hi, Expert
when we run the test code
QRegularExpression escapedSlash("(\\\\)(/)"); QString str = "MMWSPY"; str.replace(escapedSlash, "/");
with Qt 5.15.9, it report Valgrind "Invalid Read" issue
==122918== Invalid read of size 16 ==122918== at 0x1976FBC0: ??? ==122918== by 0x1587D367: ??? ==122918== Address 0x1587d36e is 30 bytes inside a block of size 40 alloc'd ==122918== at 0x402E7AD: malloc (vg_replace_malloc.c:380) ==122918== by 0x58B9B00: QArrayData::allocate(unsigned long, unsigned long, unsigned long, QFlags<QArrayData::AllocationOption>) ==122918== by 0x594A992: QString::QString(int, Qt::Initialization) ==122918== by 0x5AF2D07: ??? ==122918== by 0x5AF35B1: ??? ==122918== by 0x594DFCA: QString::fromAscii_helper(char const*, int)
Could you please help to fix it?
if not, is it safe or how can we prevent this warning?