[all-commits] [llvm/llvm-project] f5f965: Move interceptors for libresolv functions to MSan ...

Aaron Puchert via All-commits all-commits at lists.llvm.org
Mon Dec 9 13:03:25 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f5f965058a5f9b835382f96bd4041bc7e608ece0
      https://github.com/llvm/llvm-project/commit/f5f965058a5f9b835382f96bd4041bc7e608ece0
  Author: Aaron Puchert <aaron.puchert at sap.com>
  Date:   2024-12-09 (Mon, 09 Dec 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/test/Driver/sanitizer-ld.c
    M compiler-rt/lib/msan/msan_interceptors.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
    A compiler-rt/test/msan/Linux/dn_expand.cpp
    R compiler-rt/test/sanitizer_common/TestCases/Linux/b64.cpp
    R compiler-rt/test/sanitizer_common/TestCases/Linux/dn_expand.cpp

  Log Message:
  -----------
  Move interceptors for libresolv functions to MSan (#119071)

The functions are not relevant for most sanitizers and only required for
MSan to see which regions have been written to. This eliminates a link
dependency for all other sanitizers and fixes #59007: while `-lresolv`
had been added for the static runtime in 6dce56b2a308, it wasn't added
to the shared runtimes.

Instead of just moving the interceptors, we adapt them to MSan
conventions:
* We don't skip intercepting when `msan_init_is_running` is true, but
directly call ENSURE_MSAN_INITED() like most other interceptors. It
seems unlikely that these functions are called during initialization.
* We don't unpoison `errno`, because none of the functions is specified
to use it.



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