[mythtv-commits] [MythTV/mythtv] dc5035: Fix crash in thread destruction.

David Hampton noreply at github.com
Thu Feb 4 19:12:09 UTC 2021

  Branch: refs/heads/master
  Home:   https://github.com/MythTV/mythtv
  Commit: dc50358b478d12621e30d01f8abe5e7aeef9571b
  Author: David Hampton <mythtv at 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.

More information about the mythtv-commits mailing list