* gcc4: libstdc++6-4.5.3-2 is probably not backwards compatible
@ 2011-09-24 16:51 Christian Franke
0 siblings, 0 replies; only message in thread
From: Christian Franke @ 2011-09-24 16:51 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
ddrescue segfaults in option parsing after gcc was updated from 4.3.4-4
to 4.5.3-2.
(ddrescue package was build with g++ 4.3.4-3)
I tracked down the problem to a segfault in vector< string > destructor,
see attached testcase.
1. Compile and run with g++ 4.3.4, use -O2 to enable inline expansion:
$ g++ -O2 -o testvector testvector.cpp
$ cygcheck -f /bin/cygstdc++-6.dll
libstdc++6-4.3.4-4
$ ./testvector
vector created (12)
vector destroyed
2. Update libstdc++ and rerun:
$ cygcheck -f /bin/cygstdc++-6.dll
libstdc++6-4.5.3-2
$ ./testvector
vector created (12)
Aborted (core dumped)
Recompiling with new g++ fixes the problem.
Old inline code is probably no longer compatible with code in new
cygstdc++-6.dll.
--
Regards,
Christian Franke
[-- Attachment #2: testvector.cc --]
[-- Type: text/plain, Size: 258 bytes --]
#include <cstdio>
#include <string>
#include <vector>
int main()
{
{
std::vector<std::string> v;
v.resize(1);
printf("vector created (%d)\n", (int)sizeof(v)); fflush(stdout);
}
printf("vector destroyed\n"); fflush(stdout);
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-09-23 20:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-24 16:51 gcc4: libstdc++6-4.5.3-2 is probably not backwards compatible Christian Franke
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).