[all-commits] [llvm/llvm-project] e632e9: [lldb] Remove logging from Platform::~Platform

Raphael Isemann via All-commits all-commits at lists.llvm.org
Thu Oct 14 11:43:14 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e632e900ac1092f581b42fb93662613db9977b5a
      https://github.com/llvm/llvm-project/commit/e632e900ac1092f581b42fb93662613db9977b5a
  Author: Raphael Isemann <teemperor at gmail.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M lldb/include/lldb/Target/Platform.h
    M lldb/source/Target/Platform.cpp

  Log Message:
  -----------
  [lldb] Remove logging from Platform::~Platform

Platform instances are stored in a function-local static list. However, the
logging code involves locking a function-local static mutex. This only works on
some implementations where the Log mutex is by accident destroyed *after* the
Platform list is destroyed.

This fixes randomly failing tests due to `recursive_mutex lock failed: Invalid
argument`.

Reviewed By: kastiglione

Differential Revision: https://reviews.llvm.org/D111816




More information about the All-commits mailing list