[LLVMdev] LLD dynamic compilation
Shankar Easwaran
shankare at codeaurora.org
Thu Jul 3 08:29:26 PDT 2014
On 6/30/2014 12:47 PM, Shankar Easwaran wrote:
> On 6/30/2014 10:55 AM, Renato Golin wrote:
>> On 30 June 2014 16:16, Shankar Easwaran <shankare at codeaurora.org> wrote:
>>> I think you are hitting a bug, the Observer pattern was added a few
>>> weeks
>>> back, and may be there is some sort of uninitialized variable ?
>> This is my back-trace at "-O2 -g" (since -O1 pass):
>>
>> operator() (file=<optimized out>, __closure=0x7fffffffde40) at
>> /home/rengolin/devel/llvm/src/llvm/tools/lld/unittests/DriverTests/InputGraphTest.cpp:197
>>
>> 197 _graph->registerObserver([&](File *file) {
>> files.push_back(file->path()); });
>> (gdb) bt
>> #0 operator() (file=<optimized out>, __closure=0x7fffffffde40) at
>> /home/rengolin/devel/llvm/src/llvm/tools/lld/unittests/DriverTests/InputGraphTest.cpp:197
>>
>> #1
>> llvm::function_ref<void(lld::File*)>::callback_fn<InputGraphTest_Observer_Test::TestBody()::<lambda(lld::File*)>
>>> (intptr_t, lld::File *) (callable=140737488346688,
>> param1=<optimized out>) at
>> /home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:117
>> #2 0x00000000005b3ec4 in operator() (param1=<optimized out>,
>> this=0xa1e2a0) at
>> /home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:126
>> #3 callback_fn<llvm::function_ref<void(lld::File*)> >
>> (param1=<optimized out>, callable=10609312) at
>> /home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:117
>> #4 operator() (param1=<optimized out>, this=<synthetic pointer>) at
>> /home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:126
>> #5 lld::InputGraph::getNextFile (this=<optimized out>) at
>> /home/rengolin/devel/llvm/src/llvm/tools/lld/lib/Core/InputGraph.cpp:27
>> #6 0x0000000000462a87 in (anonymous
>> namespace)::InputGraphTest::getNext (this=0xa1e6b0)
>> at
>> /home/rengolin/devel/llvm/src/llvm/tools/lld/unittests/DriverTests/InputGraphTest.cpp:64
>> #7 0x000000000046c749 in InputGraphTest_Observer_Test::TestBody
>> (this=0xa1e6b0) at
>> /home/rengolin/devel/llvm/src/llvm/tools/lld/unittests/DriverTests/InputGraphTest.cpp:201
>>
>> #8 0x0000000000479bda in testing::Test::Run (this=0xa1e6b0) at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/src/gtest.cc:2162
>>
>> #9 0x000000000047abd0 in testing::TestInfo::Run (this=0xa1d6f0) at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/src/gtest.cc:2309
>>
>> #10 0x000000000047adc5 in testing::TestCase::Run (this=0xa1cfe0) at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/src/gtest.cc:2416
>>
>> #11 0x000000000047fd40 in testing::internal::UnitTestImpl::RunAllTests
>> (this=0xa0f140) at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/src/gtest.cc:4205
>>
>> #12 0x000000000047fff2 in
>> HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
>> bool> (location=<synthetic pointer>,
>> method=(bool
>> (testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl *
>> const)) 0x47faf0 <testing::internal::UnitTestImpl::RunAllTests()>,
>> object=0xa0f140)
>> at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/src/gtest.cc:2145
>> #13 testing::UnitTest::Run (this=<optimized out>) at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/googletest/src/gtest.cc:3842
>>
>> #14 0x0000000000410796 in main (argc=1, argv=0x7fffffffe0d8) at
>> /home/rengolin/devel/llvm/src/llvm/utils/unittest/UnitTestMain/TestMain.cpp:48
>>
> Thanks Renato.
I tried to debug this usecase f as I am unable to reproduce it on my
ubuntu machine, with the stack trace that you have mentioned above, I
dont see how this could result here.
Could you try running this with sanitize options and check if there is
something that your setup is figuring out something wrong ?
Thanks
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-dev
mailing list