[all-commits] [llvm/llvm-project] 62139c: tsan: remove implicit memcpy in MutexSet::Desc::op...

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Thu Aug 12 06:10:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 62139c5b2563f99226d62da56dc205038cc2c819
      https://github.com/llvm/llvm-project/commit/62139c5b2563f99226d62da56dc205038cc2c819
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-08-12 (Thu, 12 Aug 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_mutexset.cpp
    M compiler-rt/lib/tsan/rtl/tsan_mutexset.h

  Log Message:
  -----------
  tsan: remove implicit memcpy in MutexSet::Desc::operator=()

The default compiler-generated MutexSet::Desc::operator=()
now contains memcpy() call since Desc become bigger.
This fails in debug mode since we call interceptor from within the runtime.
Define own operator=() using internal_memcpy().
This also makes copy ctor necessary, otherwise:
tsan_mutexset.h:33:11: warning: definition of implicit copy constructor for
'Desc' is deprecated because it has a user-declared copy assignment operator
And if we add copy ctor, we also need the default ctor
since it's called by MutexSet ctor.

Depends on D107911.

Reviewed By: melver

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




More information about the All-commits mailing list