[all-commits] [llvm/llvm-project] 4e1a6c: [msan] Add stat-family interceptors on Linux

Nikita Malyavin via All-commits all-commits at lists.llvm.org
Wed Oct 20 17:15:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4e1a6c07052b466a2a1cd0c3ff150e4e89a6d87a
      https://github.com/llvm/llvm-project/commit/4e1a6c07052b466a2a1cd0c3ff150e4e89a6d87a
  Author: Nikita Malyavin <nikitamalyavin at gmail.com>
  Date:   2021-10-20 (Wed, 20 Oct 2021)

  Changed paths:
    M compiler-rt/lib/msan/msan_interceptors.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h

  Log Message:
  -----------
  [msan] Add stat-family interceptors on Linux

Add following interceptors on Linux: stat, lstat, fstat, fstatat.

This fixes use-of-uninitialized value on platforms with GLIBC 2.33+.
In particular: Arch Linux, Ubuntu hirsute/impish.

The tests should have also been failing during the release on the mentioned platforms, but I cannot find any related discussion.

Most likely, the regression was introduced by glibc commit [[ https://github.com/bminor/glibc/commit/8ed005daf0ab03e142500324a34087ce179ae78e | 8ed005daf0ab03e14250032 ]]:
all stat-family functions are now exported as shared functions.

Before, some of them (namely stat, lstat, fstat, fstatat) were provided as a part of libc_noshared.a and called their __xstat dopplegangers. This is still true for Debian Sid and earlier Ubuntu's. stat interceptors may be safely provided for them, no problem with that.

Closes https://github.com/google/sanitizers/issues/1452.
See also https://jira.mariadb.org/browse/MDEV-24841

Reviewed By: eugenis

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




More information about the All-commits mailing list