[all-commits] [llvm/llvm-project] a79098: [compiler-rt] Destroy pthread attrs after use in t...

Kyle Evans via All-commits all-commits at lists.llvm.org
Tue Jan 21 08:28:55 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a79098bc726e8de85d3ed0050de5395015bca031
      https://github.com/llvm/llvm-project/commit/a79098bc726e8de85d3ed0050de5395015bca031
  Author: Kyle Evans <kevans at FreeBSD.org>
  Date:   2025-01-21 (Tue, 21 Jan 2025)

  Changed paths:
    M compiler-rt/test/asan/TestCases/Posix/fake_stack_gc.cpp
    M compiler-rt/test/asan/TestCases/Posix/unpoison-alternate-stack.cpp
    M compiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp

  Log Message:
  -----------
  [compiler-rt] Destroy pthread attrs after use in tests (#114923)

The attr typically located on the stack is of an opaque pthread_attr_t
type, which may be a pointer that gets initialized by
pthread_attr_init(). Explicitly clean up the attr with
pthread_attr_destroy() to avoid a leak on such platforms to avoid
unexpected test failures with lsan enabled.

This primarily affects FreeBSD; NetBSD, musl, and glibc will seemingly
all use a full-sized pthread_attr_t.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list