[cfe-dev] libcxxabi cmake test problem on Linux x86-64
Eric Fiselier
eric at efcs.ca
Wed Nov 26 12:37:03 PST 2014
Evgeniy,
Would you be willing to reproduce this again but in debug mode instead
of release so we get a better stack trace?
/Eric
On Wed, Nov 26, 2014 at 5:20 AM, Evgeniy Stepanov
<eugeni.stepanov at gmail.com> wrote:
> I've got the same issue.
> On Linux (Trusty/x86_64), build clang with libc++/libc++abi (just
> plain ninja clang cxx cxxabi w/o any special cmake flags), then use it
> to bootstrap clang like this:
>
> CC=/code/llvm/build2/bin/clang \
> CXX=/code/llvm/build2/bin/clang++ \
> LDFLAGS="-lc++abi -L/code/llvm/build2/lib -Wl,-rpath,/code/llvm/build2/lib" \
> cmake \
> -GNinja \
> -DCMAKE_BUILD_TYPE=Release \
> -DLLVM_ENABLE_LIBCXX=ON \
> ..
>
> In the second tree, MCJIT tests fail with the same error:
>
> ./bin/lli -relocation-model=pic -code-model=large
> ../test/ExecutionEngine/MCJIT/eh-lg-pic.ll
> terminating with uncaught exception of type int
> 0 lli 0x0000000000a80a9a
> _ZN4llvm3sys15PrintStackTraceEP8_IO_FILE + 42
> 1 lli 0x0000000000a81eeb
> 2 libpthread.so.0 0x00007f83baabf340
> 3 libc.so.6 0x00007f83b9d2fbb9 gsignal + 57
> 4 libc.so.6 0x00007f83b9d32fc8 abort + 328
> 5 libc++abi.so.1 0x00007f83bb5121a7
> 6 libc++abi.so.1 0x00007f83bb512355
> 7 libc++abi.so.1 0x00007f83bb55c3b3
> 8 libc++abi.so.1 0x00007f83bb55bb66 __cxa_throw + 166
> 9 libc++abi.so.1 0x00007f83bb98802d __cxa_throw + 4375917
> 10 libc++abi.so.1 0x00007f83bb98803d __cxa_throw + 4375933
> 11 lli 0x0000000000849649
> _ZN4llvm5MCJIT11runFunctionEPNS_8FunctionERKNSt3__16vectorINS_12GenericValueENS3_9allocatorIS5_EEEE
> + 1209
> 12 lli 0x00000000007ecd08
> _ZN4llvm15ExecutionEngine17runFunctionAsMainEPNS_8FunctionERKNSt3__16vectorINS3_12basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEENS8_ISA_EEEEPKPKc
> + 1192
> 13 lli 0x000000000050c434 main + 10404
> 14 libc.so.6 0x00007f83b9d1aec5 __libc_start_main + 245
> 15 lli 0x00000000005092fb
> Stack dump:
> 0. Program arguments: ./bin/lli -relocation-model=pic
> -code-model=large ../test/ExecutionEngine/MCJIT/eh-lg-pic.ll
> Aborted (core dumped)
>
> On Sat, Aug 16, 2014 at 9:24 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
>> Ping?
>>
>> On Jul 17, 2014 11:05 AM, "İsmail Dönmez" <ismail at donmez.ws> wrote:
>>>
>>> Hi,
>>>
>>>
>>> On Wed, Jul 16, 2014 at 6:43 PM, Nico Weber <thakis at chromium.org> wrote:
>>>>
>>>> On Wed, Jul 16, 2014 at 4:10 AM, İsmail Dönmez <ismail at donmez.ws> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>> On Mon, Jul 14, 2014 at 8:10 PM, Dan Albert <danalbert at google.com>
>>>>> wrote:
>>>>>>
>>>>>> Submitted (with some slight modifications, s/libgcc_s/libgcc_eh/) as
>>>>>> r212958. Tested with and without the LLVM unwinder, and things look good.
>>>>>> Thanks again!
>>>>>
>>>>>
>>>>> Changing gcc_s with gcc_eh doesn't look good. libcxxabi tests pass but
>>>>> llvm MCJIT exception tests fail with:
>>>>>
>>>>> "terminating with uncaught exception of type int"
>>>>
>>>>
>>>> Can you try to make a reduced test case for libcxxabi from this?
>>>>
>>>
>>>
>>>
>>> Smallest test cases are
>>> test/ExecutionEngine/MCJIT/{eh-sm-pic,eh-lg-pic}.ll
>>>
>>> Both fail the same way:
>>>
>>> /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/lli -use-mcjit
>>> -relocation-model=pic -code-model=small
>>> /home/abuild/rpmbuild/BUILD/llvm/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
>>> --
>>> Exit Code: 134
>>>
>>> Command Output (stderr):
>>> --
>>> terminating with uncaught exception of type int
>>> 0 libLLVMSupport.so 0x00007f9c6ddf7d85
>>> llvm::sys::PrintStackTrace(_IO_FILE*) + 37
>>> 1 libLLVMSupport.so 0x00007f9c6ddf83f3
>>> 2 libpthread.so.0 0x00007f9c6d0d79f0
>>> 3 libc.so.6 0x00007f9c6c806849 gsignal + 57
>>> 4 libc.so.6 0x00007f9c6c807cd8 abort + 328
>>> 5 libc++abi.so.1 0x00007f9c6cb89237
>>> 6 libc++abi.so.1 0x00007f9c6cb894b6
>>> 7 libc++abi.so.1 0x00007f9c6cbeda7e
>>> 8 libc++abi.so.1 0x00007f9c6cbec6ed
>>> 9 libc++abi.so.1 0x00007f9c6cbec646
>>> 10 libc++abi.so.1 0x00007f9c6ff3001c
>>> 11 libc++abi.so.1 0x00007f9c6ff30026
>>> 12 libLLVMMCJIT.so 0x00007f9c6e61fd27
>>> llvm::MCJIT::runFunction(llvm::Function*,
>>> std::__1::vector<llvm::GenericValue, std::__1::allocator<llvm::GenericValue>
>>> > const&) + 919
>>> 13 libLLVMExecutionEngine.so 0x00007f9c6f34fa65
>>> llvm::ExecutionEngine::runFunctionAsMain(llvm::Function*,
>>> std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>,
>>> std::__1::allocator<char> >,
>>> std::__1::allocator<std::__1::basic_string<char,
>>> std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, char
>>> const* const*) + 1221
>>> 14 lli 0x000000000040c8b7 main + 6599
>>> 15 libc.so.6 0x00007f9c6c7f2be5 __libc_start_main + 245
>>> 16 lli 0x000000000040a6d1
>>> Stack dump:
>>> 0. Program arguments: /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/lli
>>> -use-mcjit -relocation-model=pic -code-model=small
>>> /home/abuild/rpmbuild/BUILD/llvm/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
>>>
>>> /home/abuild/rpmbuild/BUILD/llvm/stage2/test/ExecutionEngine/MCJIT/Output/eh-sm-pic.ll.script:
>>> line 1: 30636 Aborted
>>> /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/lli -use-mcjit
>>> -relocation-model=pic -code-model=small
>>> /home/abuild/rpmbuild/BUILD/llvm/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
>>>
>>> Note that this clang is hardcoded to use libc++ (-stdlibc=libc++). Is this
>>> good enough?
>>>
>>> Thanks!
>>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list