diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2018-02-15 14:44:56 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2018-02-22 19:29:26 +0000 |
commit | 2dc578a8f25b84abeae7a5049d93fb20d98607af (patch) | |
tree | 3f70f6a21866e6d2795f0eff93c5c03bf730a56e /src/testlib/qxctestlogger.mm | |
parent | d266ac3a6b21146c45be2268962a23a7f31af919 (diff) |
un-crash QPlainTestLogger::printMessage()
Commit cf4a6111150d866424ee07bda80a1d38f24ea02d refactored out test
identifier buildup into a standalone function, but it returned the
QTestCharBuffer as a value type, which ultimately caused it to crash:
Unfortunately QTestCharBuffer is not copied correctly: Since it uses the
default copy ctor it will copy the buf pointer and create a deep copy of
the staticBuf pointer. When the dtor was later called it would then end up
calling free(buf) (where buf pointed to the staticBuf of the original
QTestCharBuffer).
Task-number: QTBUG-66607
Change-Id: Ifa290658be6f077a0d6613451c26aeeffc8df41c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 6ffb358822db2e0d30fb34853c3222cd866d57c5)
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/testlib/qxctestlogger.mm')
0 files changed, 0 insertions, 0 deletions