This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc4: libstdc++6-4.5.3-2 is probably not backwards compatible


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: testvector.cc
Description: Text document

--
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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]