http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53746
Bug #: 53746 Summary: [lto] segfault in std::vector::__base_ctor Classification: Unclassified Product: gcc Version: 4.7.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: vincenzo.innoce...@cern.ch this is a place holder pending the production of a "reasonable size" test-case I have a library (just one out of 2000!) in which I get a segfault at runtime in constructing a vector (data member of class). the library is made out of 10 compilation units from the stack trace below it seems that a "0" pointer is passed as "target" of a memmove the code involved (main + "host"-constructor) is few lines long BUT the difficulty in reducing the whole library in a test-case is that it works with -flto-partition=1to1 if I "cat" all 10 compilation units in a single one if I delete 5 of the compilation units (almost at random, besides the one containing the code where the crash occurs) if I ADD the following trivial compilation unit (not sure the content matters...) cat a1.cc #include <vector> std::vector<int> a1(std::vector<int> v, int a) { v.push_back(a); return v; } so to reproduce the crash a "lot" of other code need to be present and in a given configuration I'll try at least to reduce the dependencies from external libraries, still it will take time. any suggesting on how to proceed in the debug process (or involve any of you) is appreciated "segfault" Breakpoint 2, 0x0000003a4f679580 in memmove () from /lib64/libc.so.6 #0 0x0000003a4f679580 in memmove () from /lib64/libc.so.6 #1 0x00002aaaaaac3b89 in __copy_m (__result=0x0, __last=<optimized out>, __first=0xfbc000) at /afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:366 #2 std::vector::__base_ctor (this=0xfbc238, __x=<optimized out>) at /afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:384 #3 0x00002aaaaaad619a in HybridClusterAlgo::HybridClusterAlgo (this=0xfbc100, eb_str=<optimized out>, step=<optimized out>, ethres=<optimized out>, eseed=<optimized out>, xi=<optimized out>, useEtForXi=<optimized out>, ewing=<optimized out>, v_chstatus=<optimized out>, posCalculator=..., dynamicEThres=<optimized out>, eThresA=<optimized out>, eThresB=<optimized out>, severityToExclude=..., excludeFromCluster=false) at /build/vin/bug/CMSSW_6_0_0_pre7/src/RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc:38 #4 0x0000000000404f8b in main (s=<optimized out>) at /build/vin/bug/CMSSW_6_0_0_pre7/src/RecoEcal/EgammaClusterAlgos/test/HybridClusterTest.cpp:63 "runs" Breakpoint 2, 0x0000003a4f679580 in memmove () from /lib64/libc.so.6 #0 0x0000003a4f679580 in memmove () from /lib64/libc.so.6 #1 0x00002aaaaaabe0e5 in std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<int> (__first=<optimized out>, __last=<optimized out>, __result=0xfbc2b0) at /afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:366 #2 0x00002aaaaaac699c in std::vector::__base_ctor (this=0xfbc238, __x=...) at /afs/cern.ch/user/i/innocent/w3/gcc47slc5/lib/gcc/x86_64-unknown-linux-gnu/4.7.1/../../../../include/c++/4.7.1/bits/stl_algobase.h:384 #3 0x00002aaaaaad740a in HybridClusterAlgo::HybridClusterAlgo (this=0xfbc100, eb_str=<optimized out>, step=<optimized out>, ethres=<optimized out>, eseed=<optimized out>, xi=<optimized out>, useEtForXi=<optimized out>, ewing=<optimized out>, v_chstatus=<optimized out>, posCalculator=..., dynamicEThres=<optimized out>, eThresA=<optimized out>, eThresB=<optimized out>, severityToExclude=..., excludeFromCluster=false) at /build/vin/bug/CMSSW_6_0_0_pre7/src/RecoEcal/EgammaClusterAlgos/src/HybridClusterAlgo.cc:38 #4 0x0000000000404f8b in main (s=<optimized out>) at /build/vin/bug/CMSSW_6_0_0_pre7/src/RecoEcal/EgammaClusterAlgos/test/HybridClusterTest.cpp:63