[PATCH] D28609: [lsan] Enable LSan for x86 Linux.

Maxim Ostapenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 07:57:11 PST 2017


m.ostapenko created this revision.
m.ostapenko added reviewers: kcc, eugenis, ygribov.
m.ostapenko added a subscriber: llvm-commits.
m.ostapenko set the repository for this revision to rL LLVM.
m.ostapenko added a project: Sanitizers.
Herald added subscribers: mgorny, kubabrecka, srhines, danalbert, aemerson.

People keep asking LSan to be available on 32 bit targets (e.g. https://github.com/google/sanitizers/issues/403) despite the fact that false negative ratio might be huge (up to 85%). This happens for big real world applications that may contain random binary data (e.g. browser), but for smaller apps situation is not so terrible and LSan still might be useful.
This patch adds initial support for x86 Linux (disabled by default), ARM32 is in TODO list.
We used this patch (well, ported to GCC) on our 32 bit mobile emulators and it worked pretty fine thus I'm posting it here to initiate further discussion.


Repository:
  rL LLVM

https://reviews.llvm.org/D28609

Files:
  cmake/config-ix.cmake
  lib/lsan/lsan_allocator.cc
  lib/lsan/lsan_common.h
  lib/lsan/lsan_interceptors.cc
  lib/sanitizer_common/sanitizer_flags.inc
  lib/sanitizer_common/sanitizer_linux.cc
  lib/sanitizer_common/sanitizer_linux.h
  lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
  test/asan/lit.cfg
  test/lsan/TestCases/disabler.cc
  test/lsan/TestCases/do_leak_check_override.cc
  test/lsan/TestCases/high_allocator_contention.cc
  test/lsan/TestCases/large_allocation_leak.cc
  test/lsan/TestCases/leak_check_at_exit.cc
  test/lsan/TestCases/link_turned_off.cc
  test/lsan/TestCases/pointer_to_self.cc
  test/lsan/TestCases/print_suppressions.cc
  test/lsan/TestCases/recoverable_leak_check.cc
  test/lsan/TestCases/register_root_region.cc
  test/lsan/TestCases/stale_stack_leak.cc
  test/lsan/TestCases/suppressions_default.cc
  test/lsan/TestCases/suppressions_file.cc
  test/lsan/TestCases/use_after_return.cc
  test/lsan/TestCases/use_globals_initialized.cc
  test/lsan/TestCases/use_globals_uninitialized.cc
  test/lsan/TestCases/use_poisoned_asan.cc
  test/lsan/TestCases/use_registers.cc
  test/lsan/TestCases/use_stacks.cc
  test/lsan/TestCases/use_stacks_threaded.cc
  test/lsan/TestCases/use_tls_dynamic.cc
  test/lsan/TestCases/use_tls_pthread_specific_dynamic.cc
  test/lsan/TestCases/use_tls_pthread_specific_static.cc
  test/lsan/TestCases/use_tls_static.cc
  test/lsan/TestCases/use_unaligned.cc
  test/sanitizer_common/TestCases/Posix/sanitizer_set_death_callback_test.cc
  test/sanitizer_common/TestCases/corelimit.cc
  test/sanitizer_common/print_address.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28609.84120.patch
Type: text/x-patch
Size: 26062 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170112/80ca59ed/attachment.bin>


More information about the llvm-commits mailing list