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

Hans Wennborg via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 10:40:04 PST 2017


This has been in for a while now, and I haven't heard of any problems,
so let's merge it.

r293917.

Cheers,
Hans

On Wed, Feb 1, 2017 at 1:49 PM, Kostya Serebryany <kcc at google.com> wrote:
> 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
>>
>


More information about the llvm-commits mailing list