[all-commits] [llvm/llvm-project] dc3728: [asan] Fix read_binary_name_regtest.c test dying w...

Ilya Leoshkevich via All-commits all-commits at lists.llvm.org
Thu Mar 26 05:37:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: dc37287320cc074a49d73035674891be06c65a42
      https://github.com/llvm/llvm-project/commit/dc37287320cc074a49d73035674891be06c65a42
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c

  Log Message:
  -----------
  [asan] Fix read_binary_name_regtest.c test dying with SIGPIPE

Disable symbolization of results, since llvm-symbolizer cannot start
due to restricted readlink(), causing the test to die with SIGPIPE.

Author: Ilya Leoshkevich
Reviewed By: Evgenii Stepanov

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


  Commit: 2ca7fe3796475ec5afc1c804a3f92abbfa4cb2f9
      https://github.com/llvm/llvm-project/commit/2ca7fe3796475ec5afc1c804a3f92abbfa4cb2f9
  Author: Ilya Leoshkevich <iii at linux.ibm.com>
  Date:   2020-03-26 (Thu, 26 Mar 2020)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_linux.h
    M compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cpp

  Log Message:
  -----------
  [compiler-rt] Use uname syscall in GetKernelAreaSize()

Commit 5f5fb56c68e4 ("[compiler-rt] Intercept the uname() function")
broke clang-cmake-thumbv7-full-sh build:

http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-full-sh/builds/4296

This also affects i386.

The reason is that intercepted uname() is called by GetKernelAreaSize()
during ASAN initialization on 32-bit platforms, but the respective
interceptor is not initialized yet at this point, leading to null
pointer dereference.

Introduce internal_uname() wrapper around uname syscall, and use it in
GetKernelAreaSize() and in FixedCVE_2016_2143().

Author: Ilya Leoshkevich
Reviewed By: Evgenii Stepanov

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


Compare: https://github.com/llvm/llvm-project/compare/db8a3c4206d7...2ca7fe379647


More information about the All-commits mailing list