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> On the cyclic dependency there was a recent conversation that was trying to > fix this, but I am not sure where it is.Is this on llvmdev? Or is there a special lld list? cheers, --renato
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:48Thanks Renato.> > >> On the cyclic dependency there was a recent conversation that was trying to >> fix this, but I am not sure where it is. > Is this on llvmdev? Or is there a special lld list?http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073407.html Shankar Easwaran -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
On 30 June 2014 18:47, Shankar Easwaran <shankare at codeaurora.org> wrote:>>> On the cyclic dependency there was a recent conversation that was trying >>> to fix this, but I am not sure where it is. >> >> Is this on llvmdev? Or is there a special lld list? > > http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-June/073407.htmlHi Shankar, It seems that the "solution" proposed on that email was done, but it doesn't fix the cyclic dependency in CMake. I'm copying the parties involved to make sure it's not something I am doing wrong. cheers, --renato
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