[all-commits] [llvm/llvm-project] 0db3ac: [compiler-rt][asan] Define MemToShadowSize for spa...

rorth via All-commits all-commits at lists.llvm.org
Fri Jul 17 01:05:07 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0db3ac33540ee6a846d68472a439385fbf219fb6
      https://github.com/llvm/llvm-project/commit/0db3ac33540ee6a846d68472a439385fbf219fb6
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2020-07-17 (Fri, 17 Jul 2020)

  Changed paths:
    M compiler-rt/lib/asan/asan_mapping_sparc64.h

  Log Message:
  -----------
  [compiler-rt][asan] Define MemToShadowSize for sparc64

[compiler-rt][asan][hwasan] Refactor shadow setup into sanitizer_common (NFCI) <https://reviews.llvm.org/D83247>
broke the Solaris/sparcv9 <http://lab.llvm.org:8014/builders/clang-solaris11-sparcv9/builds/6623> build:

  FAILED: projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o
  /opt/llvm-buildbot/bin/c++  -D_DEBUG -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/asan -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan -Iinclude -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include/llvm/Support/Solaris -I/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/.. -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -std=c++14 -Wno-unused-parameter -O3     -m64 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fvisibility=hidden -fno-lto -O3 -g -Wno-variadic-macros -Wno-non-virtual-dtor -fno-rtti -UNDEBUG -std=c++14 -MD -MT projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o -MF projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o.d -o projects/compiler-rt/lib/asan/CMakeFiles/RTAsan.sparcv9.dir/asan_linux.cpp.o -c /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp
  /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp: In function ‘__sanitizer::uptr __asan::FindDynamicShadowStart()’:
  /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp:103:28: error: ‘MemToShadowSize’ was not declared in this scope
     uptr shadow_size_bytes = MemToShadowSize(kHighMemEnd);
                              ^~~~~~~~~~~~~~~
  /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/compiler-rt/lib/asan/asan_linux.cpp:103:28: note: suggested alternative: ‘MemToShadow’
     uptr shadow_size_bytes = MemToShadowSize(kHighMemEnd);
                              ^~~~~~~~~~~~~~~
                              MemToShadow

Fixed by also definining `MemToShadowSize` in `compiler-rt/lib/asan/asan_mapping_sparc64.h`.

Tested on `sparcv9-sun-solaris2.11`.

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




More information about the All-commits mailing list