Dimitry Andric 4ee07888b7 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
2017-02-01 20:41:09 +00:00
..
2016-11-14 00:33:03 +00:00
2017-02-01 02:42:45 +00:00
2016-12-19 23:38:07 +00:00
2016-12-13 22:16:02 +00:00
2017-01-28 16:31:23 +00:00
2016-07-01 05:48:45 +00:00
2016-11-07 15:54:47 +00:00
2016-04-20 17:58:13 +00:00
2016-12-04 21:13:26 +00:00
2016-01-05 05:25:16 +00:00
2017-01-10 21:59:35 +00:00
2016-07-30 01:16:06 +00:00
2016-08-03 20:21:58 +00:00
2016-10-01 00:14:01 +00:00
2016-07-03 01:35:27 +00:00
2016-09-03 23:04:56 +00:00
2017-01-30 16:32:53 +00:00
2016-08-24 12:32:24 +00:00
2017-02-01 20:26:42 +00:00
2016-12-04 23:23:59 +00:00
2016-09-29 18:24:29 +00:00
2017-01-06 07:54:53 +00:00
2017-01-17 05:55:47 +00:00