[LLVMdev] ASan unit test/libcxx build break

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon May 13 01:49:48 PDT 2013


A recent change added defined(__linux__) condition to the code below.
Now it says that on linux with --std=c++0x (or --std=c++11) the system
stdlib.h header must define aligned_alloc(). Really?

include/__config:

#if ( defined(__FreeBSD__) || defined(__linux__) ) && (__ISO_C_VISIBLE
>= 2011 || __cplusplus >= 201103L)
#define _LIBCPP_HAS_QUICK_EXIT
#define _LIBCPP_HAS_C11_FEATURES
#endif


include/cstdlib:

#include <__config>
#include <stdlib.h>
#ifdef _LIBCPP_HAS_C11_FEATURES
using ::aligned_alloc;
#endif

On Mon, May 13, 2013 at 9:37 AM, Kostya Serebryany <kcc at google.com> wrote:
> +eugenis
>
> I see this while running 'check-msan'.
>
>
>
> On Sun, May 12, 2013 at 9:10 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>
>> Is no one else seeing this? (I've been seeing it for a few days)
>>
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/utils/unittest/googletest/gtest-all.cc:39:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/utils/unittest/googletest/include/gtest/gtest.h:57:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-internal.h:40:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/utils/unittest/googletest/include/gtest/internal/gtest-port.h:197:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/iostream:40:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/istream:156:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/ostream:132:
>> In file included from
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/locale:187:
>>
>> /usr/local/google/home/blaikie/dev/llvm/src/projects/libcxx/include/cstdlib:154:9:
>> error: no member named 'aligned_alloc' in the global namespace
>> using ::aligned_alloc;
>>       ~~^
>> 1 error generated.
>>
>> Not sure who/how this was caused (whether by libcxx or the asan unit
>> test it was included from, or some chain of includes along the way)
>>
>> (on Linux, fwiw)
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>



More information about the llvm-dev mailing list