|
Boost Testing : |
Subject: Re: [Boost-testing] BenPope x86_64 Ubuntu issue at link time
From: Ben Pope (benpope81_at_[hidden])
Date: 2015-05-06 10:02:45
On Wednesday, May 06, 2015 07:55 PM, Vicente J. Botet Escriba wrote:
> Hi,
>
>
> I'm getting this link error
>
> /usr/bin/ld: error:
> /home/ben/development/boost/test/build/results/boost/bin.v2/libs/thread/test/thread__constr__FArgs_p_lib.test/clang-linux-3.7~asan~c14_libc++/debug/threading-multi/threads/thread/constr/FArgs_pass.o:
> multiple definition of 'operator delete(void*)'
> /usr/bin/ld:
> /home/ben/development/llvm/trunk/install/release/bin/../lib/clang/3.7.0/lib/linux/libclang_rt.asan_cxx-x86_64.a(asan_new_delete.cc.o):
> previous definition here
>
>
> at
>
> http://www.boost.org/development/tests/develop/developer/output/BenPope%20x86_64%20Ubuntu-boost-bin-v2-libs-thread-test-thread__constr__FArgs_p_lib-test-clang-linux-3-7~asan~c14_libc++-debug-threading-multi.html
>
>
> I define it as follows
>
> #if defined _GLIBCXX_THROW
> void* operator new(std::size_t s) _GLIBCXX_THROW (std::bad_alloc)
> #elif defined BOOST_MSVC
> void* operator new(std::size_t s)
> #else
> void* operator new(std::size_t s) throw (std::bad_alloc)
> #endif
> {
> std::cout << __FILE__ << ":" << __LINE__ << std::endl;
> if (throw_one == 0) throw std::bad_alloc();
> --throw_one;
> return std::malloc(s);
> }
>
> Is this a compiler issue, or is my definition of the operator new incorrect?
Looks like you've hit this issue:
https://llvm.org/bugs/show_bug.cgi?id=19660
Ben