[compiler-rt] r293536 - Recommit: Stop intercepting some malloc-related functions on FreeBSD and

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 13:49:32 PST 2017


I don't have any stake in non-trunk branches, so this is up to Hans.
The change looks pretty benign for a merge

--kcc

On Wed, Feb 1, 2017 at 12:30 PM, Dimitry Andric <dimitry at andric.com> wrote:

> This commit has now baked a few days, and I didn't see any further
> problems.  Kostya, Reid, is this OK to merge into release_40?
>
> -Dimitry
>
> On 30 Jan 2017, at 20:06, Dimitry Andric via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
> >
> > Author: dim
> > Date: Mon Jan 30 13:06:13 2017
> > New Revision: 293536
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=293536&view=rev
> > Log:
> > 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
> >
> > Added:
> >    compiler-rt/trunk/test/asan/TestCases/malloc-no-intercept.c
> > Modified:
> >    compiler-rt/trunk/lib/asan/asan_malloc_linux.cc
> >    compiler-rt/trunk/lib/asan/asan_malloc_win.cc
> >    compiler-rt/trunk/lib/lsan/lsan_interceptors.cc
> >    compiler-rt/trunk/lib/sanitizer_common/sanitizer_
> platform_interceptors.h
> >    compiler-rt/trunk/lib/sanitizer_common/tests/
> sanitizer_allocator_testlib.cc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170201/c248516c/attachment.html>


More information about the llvm-commits mailing list