[PATCH] [UBSan] Embed UBSan into ASan runtime (compiler-rt part).

Alexey Samsonov vonosmas at gmail.com
Thu Mar 26 14:41:02 PDT 2015


Hi kubabrecka, zaks.anna, rsmith, kcc,

Change the way we use ASan and UBSan together. Instead of keeping two
separate runtimes (libclang_rt.asan and libclang_rt.ubsan), embed UBSan
into ASan and get rid of libclang_rt.ubsan. If UBSan is not supported on
a platform, all UBSan sources are just compiled into dummy empty object
files. UBSan initialization code (e.g. flag parsing) is directly called
from ASan initialization, so we are able to enforce correct
initialization order.

This mirrors the approach we already use for ASan+LSan.

This change doesn't modify the way we use standalone UBSan.

http://reviews.llvm.org/D8646

Files:
  cmake/config-ix.cmake
  lib/CMakeLists.txt
  lib/asan/CMakeLists.txt
  lib/asan/asan_flags.cc
  lib/asan/asan_rtl.cc
  lib/asan/tests/CMakeLists.txt
  lib/ubsan/CMakeLists.txt
  lib/ubsan/Makefile.mk
  lib/ubsan/ubsan_diag.cc
  lib/ubsan/ubsan_flags.cc
  lib/ubsan/ubsan_flags.h
  lib/ubsan/ubsan_init.cc
  lib/ubsan/ubsan_init.h
  lib/ubsan/ubsan_init_standalone.cc
  lib/ubsan/ubsan_platform.h
  make/platform/clang_darwin.mk
  test/ubsan/TestCases/Misc/Linux/coverage-levels.cc
  test/ubsan/TestCases/TypeCheck/Function/function.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8646.22757.patch
Type: text/x-patch
Size: 24620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150326/6caf56e2/attachment.bin>


More information about the llvm-commits mailing list