Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.3
-
None
-
-
ae0d231c96ab93ec36c7202c268507314eb40116 744e9a69ab4965561529f66d8872b6c2455f4fca
Description
QTest's best feature (the signal dumper `-vs`) is a little broken.
In qtbase\src\testlib\qsignaldumper.cpp there're statics (iLevel, ignoreLevel). They are not synchronized and may be accessed from any thread. iLevel indicates the indentation and may turn negative if a thread reads a 0 before decrementing! It also creates a total mess of the output even if this variable is made atomic.
Should it be a thread_local? For a BlockingQueued emission it would logically make sense to keep the indentation level across threads.