public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/53746] New: [lto] segfault in  std::vector::__base_ctor
@ 2012-06-21 16:57 vincenzo.innocente at cern dot ch
  2012-06-21 17:13 ` [Bug lto/53746] " markus at trippelsdorf dot de
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: vincenzo.innocente at cern dot ch @ 2012-06-21 16:57 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: vincenzo.innocente@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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-09-12  7:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-21 16:57 [Bug lto/53746] New: [lto] segfault in std::vector::__base_ctor vincenzo.innocente at cern dot ch
2012-06-21 17:13 ` [Bug lto/53746] " markus at trippelsdorf dot de
2012-06-23  9:06 ` [Bug lto/53746] [lto] segfault in std::vector::__base_ctor (with -fno-math-errno -fipa-pta) vincenzo.innocente at cern dot ch
2012-06-23  9:37 ` [Bug lto/53746] [lto] segfault in std::vector::__base_ctor (with -fno-math-errno -fipa-pta) and ICE with trunk revision 188906 vincenzo.innocente at cern dot ch
2012-06-23 10:00 ` [Bug lto/53746] [lto] segfault in std::vector::__base_ctor (with -fipa-pta) vincenzo.innocente at cern dot ch
2012-11-01  7:17 ` vincenzo.innocente at cern dot ch
2021-09-12  7:52 ` [Bug ipa/53746] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).