Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-23 Thread Dimitry Andric via cfe-commits
I can confirm that r290169 indeed fixes the three test failures I got earlier. Thanks George! -Dimitry > On 23 Dec 2016, at 02:29, George Burgess IV > wrote: > > It looks like the root of this is that we're treating calls to `allocsize` > functions as AllocLike (e.g. any allocation function

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread George Burgess IV via cfe-commits
It looks like the root of this is that we're treating calls to `allocsize` functions as AllocLike (e.g. any allocation function type except realloc) functions, which caused us to perform invalid optimizations. For example, in ReallocFreedPointerTest, EarlyCSE DCE'd the realloc because llvm::isInstr

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread George Burgess IV via cfe-commits
Okay, I'm seeing this failure now if I tag my system's `realloc` declaration with `alloc_size`. (Which FreeBSD seems to do in their headers). Because all that clang does with `alloc_size` is use it to answer `__builtin_object_size` queries and lower it to LLVM's `allocsize` attribute, this is presu

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread Dimitry Andric via cfe-commits
This is when running "ninja check-all", in a tree with llvm, clang and compiler-rt checked out. The first program that shows a failure is projects/compiler-rt/lib/asan/tests/default/Asan-i386-inline-Test: [==] Running 92 tests from 3 test cases. [--] Global test environment set-

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread George Burgess IV via cfe-commits
Yes, this was reapplied in r290297 with fixes for the msan issue we caught; these asan unit test failures are news to me. Can you give me the command that you're using to run these tests, please? On Thu, Dec 22, 2016 at 11:10 AM, Dimitry Andric wrote: > On 20 Dec 2016, at 09:28, Chandler Carruth

Re: r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-22 Thread Dimitry Andric via cfe-commits
On 20 Dec 2016, at 09:28, Chandler Carruth via cfe-commits wrote: > Author: chandlerc > Date: Tue Dec 20 02:28:19 2016 > New Revision: 290169 > > URL: http://llvm.org/viewvc/llvm-project?rev=290169&view=rev > Log: > Revert r290149: Add the alloc_size attribute to clang. > > This commit fails MS

r290169 - Revert r290149: Add the alloc_size attribute to clang.

2016-12-20 Thread Chandler Carruth via cfe-commits
Author: chandlerc Date: Tue Dec 20 02:28:19 2016 New Revision: 290169 URL: http://llvm.org/viewvc/llvm-project?rev=290169&view=rev Log: Revert r290149: Add the alloc_size attribute to clang. This commit fails MSan when running test/CodeGen/object-size.c in a confusing way. After some discussion w