/[base]
ViewVC logotype

Revision 313052


Jump to revision: Previous Next
Author: dim
Date: Wed Feb 1 20:41:09 2017 UTC (7 years, 5 months ago)
Changed paths: 4
Log Message:
Pull in r293536 from upstream compiler-rt trunk:

  Recommit: Stop intercepting some malloc-related functions on FreeBSD
  and macOS

  Summary:
  In https://bugs.freebsd.org/215125 I was notified that some configure
  scripts attempt to test for the Linux-specific `mallinfo` and
  `mallopt` functions by compiling and linking small programs which
  references the functions, and observing whether that results in
  errors.

  FreeBSD and macOS do not have the `mallinfo` and `mallopt` functions,
  so normally these tests would fail, but when sanitizers are enabled,
  they incorrectly succeed, because the sanitizers define interceptors
  for these functions.  This also applies to some other malloc-related
  functions, such as `memalign`, `pvalloc` and `cfree`.

  Fix this by not intercepting `mallinfo`, `mallopt`, `memalign`,
  `pvalloc` and `cfree` for FreeBSD and macOS, in all sanitizers.

  Also delete the non-functional `cfree` wrapper for Windows, to fix the
  test cases on that platform.

  Reviewers: emaste, kcc, rnk

  Subscribers: timurrrr, eugenis, hans, joerg, llvm-commits, kubamracek

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

This prevents autoconf scripts from incorrectly detecting that functions
like mallinfo, mallopt, memalign, pvalloc and cfree are supported.

PR:		215125, 215455
MFC after:	1 week


Changed paths

Path Details
Directoryhead/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc modified , text changed
Directoryhead/contrib/compiler-rt/lib/asan/asan_malloc_win.cc modified , text changed
Directoryhead/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc modified , text changed
Directoryhead/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h modified , text changed

  ViewVC Help
Powered by ViewVC 1.1.27