[LLVMdev] ASan unit test/libcxx build break

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon May 13 02:07:16 PDT 2013


On Mon, May 13, 2013 at 11:03 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
> Hi,
>
>
> On Mon, May 13, 2013 at 10:49 AM, Evgeniy Stepanov
> <eugeni.stepanov at gmail.com> wrote:
>>
>> 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
>>
>
> I added that line since libc on linux defines at_quick_exit.
>
>
>>
>>
>> include/cstdlib:
>>
>> #include <__config>
>> #include <stdlib.h>
>> #ifdef _LIBCPP_HAS_C11_FEATURES
>> using ::aligned_alloc;
>> #endif
>
>
>  And yes my stdlib.h has
>
> /usr/include/stdlib.h:extern void *aligned_alloc (size_t __alignment, size_t
> __size)
>
> I am guessing you are running on this on an old system. My glibc version is
> 2.17

Yes. Ubuntu 12.04 LTS with glibc 2.15 does not have aligned_alloc.




More information about the llvm-dev mailing list