Mailing List Archive

[MythTV/mythtv] dc5035: Fix crash in thread destruction.
Branch: refs/heads/master
Home: https://github.com/MythTV/mythtv
Commit: dc50358b478d12621e30d01f8abe5e7aeef9571b
https://github.com/MythTV/mythtv/commit/dc50358b478d12621e30d01f8abe5e7aeef9571b
Author: David Hampton <mythtv@love2code.net>
Date: 2021-02-04 (Thu, 04 Feb 2021)

Changed paths:
M mythtv/libs/libmythbase/mthread.cpp

Log Message:
-----------
Fix crash in thread destruction.

This crash was introduced by the std::chrono changes in commit a9d53f3230.

The problem occurs because 1) std::chrono is based on an int64_t where
QThread::wait expects an uint64_t, and 2) newer versions of Qt treat
ULONG_MAX as a special value. The fix is to map the maximum std::chrono
value to ULONG_MAX. This commit also protects from negative numbers being
passed into the wait call and having them be inadvertently mapped to very
large numbers.

Closes #312.


_______________________________________________
mythtv-commits mailing list
mythtv-commits@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-commits