templated constructor using empty vector range for string class causes a core dump. Release: gcc version 3.2 Environment: solaris How-To-Repeat: see the simple file attachment - run it without options.
Responsible-Changed-From-To: unassigned->paolo Responsible-Changed-Why: Analyzing.
State-Changed-From-To: open->feedback State-Changed-Why: For some reason the attachment got lost. Could you possibly provide it again? Thanks, Paolo.
State-Changed-From-To: feedback->analyzed State-Changed-Why: Attachment provided.
From: "Adam Wilkshire" <adamwilkshire@hotmail.com> To: paolo@gcc.gnu.org, adamwilkshire@hotmail.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Cc: Subject: Re: c++/8347: empty vector range used in string construction causes core dump. Date: Fri, 25 Oct 2002 10:09:05 +0000 This is a multi-part message in MIME format. ------=_NextPart_000_38b4_2e69_7e42 Content-Type: text/html <html><div style='background-color:'><DIV> <P>Ok, here as text and attachment. </P> <P><BR>#include <iostream><BR>#include <vector><BR>#include <string></P> <P>int main(int argc,char** argv){<BR> std::vector<char> empty;<BR> std::string empty2(empty.begin(),empty.end());<BR> std::cout<<"done"<<std::endl;<BR>}</P></DIV> <DIV></DIV></div><br clear=all><hr>Unlimited Internet access -- and 2 months free! Try MSN. <a href="http://g.msn.com/8HMDEN/2020">Click Here</a> </html> ------=_NextPart_000_38b4_2e69_7e42 Content-Type: application/octet-stream; name="temp7.cc" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="temp7.cc" I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVk ZSA8c3RyaW5nPgoKaW50IG1haW4oaW50IGFyZ2MsY2hhcioqIGFyZ3Ypewog IHN0ZDo6dmVjdG9yPGNoYXI+IGVtcHR5OwogIHN0ZDo6c3RyaW5nIGVtcHR5 MihlbXB0eS5iZWdpbigpLGVtcHR5LmVuZCgpKTsKICBzdGQ6OmNvdXQ8PCJk b25lIjw8c3RkOjplbmRsOwp9Cg== ------=_NextPart_000_38b4_2e69_7e42--
From: Paolo Carlini <pcarlini@unitus.it> To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: libstdc++/8347: empty vector range used in string construction causes core dump. Date: Fri, 25 Oct 2002 12:47:49 +0200 #include <iostream> #include <vector> #include <string> int main(int argc,char** argv){ std::vector<char> empty; std::string empty2(empty.begin(),empty.end()); std::cout<<"done"<<std::endl; } http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8347
From: paolo@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libstdc++/8347 Date: 27 Oct 2002 07:35:07 -0000 CVSROOT: /cvs/gcc Module name: gcc Changes by: paolo@gcc.gnu.org 2002-10-27 00:35:07 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/testsuite/21_strings: ctor_copy_dtor.cc libstdc++-v3/include/bits: basic_string.tcc Log message: 2002-10-27 Paolo Carlini <pcarlini@unitus.it> PR libstdc++/8347 * include/bits/basic_string.tcc (string::_S_construct(_InIter, _InIter, const _Alloc&, forward_iterator_tag)): Do not throw logic error if __beg == NULL && __end == __beg. (string::string(const _CharT*, const _Alloc&)): Tweak. * testsuite/21_strings/ctor_copy_dtor.cc: Add test05 from PR. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.1403&r2=1.1404 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc.diff?cvsroot=gcc&r1=1.10&r2=1.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/basic_string.tcc.diff?cvsroot=gcc&r1=1.25&r2=1.26
State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed for 3.2.1 and 3.3.
From: paolo@gcc.gnu.org To: gcc-gnats@gcc.gnu.org Cc: Subject: libstdc++/8347 Date: 29 Oct 2002 08:08:40 -0000 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_2-branch Changes by: paolo@gcc.gnu.org 2002-10-29 00:08:40 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/testsuite/21_strings: ctor_copy_dtor.cc libstdc++-v3/include/bits: basic_string.tcc Log message: 2002-10-29 Paolo Carlini <pcarlini@unitus.it> PR libstdc++/8347 * include/bits/basic_string.tcc (string::_S_construct(_InIter, _InIter, const _Alloc&, forward_iterator_tag)): Do not throw logic error if __beg == NULL && __end == __beg. (string::string(const _CharT*, const _Alloc&)): Tweak. * testsuite/21_strings/ctor_copy_dtor.cc: Add test05 from PR. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.1057.2.159.2.38&r2=1.1057.2.159.2.39 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/21_strings/ctor_copy_dtor.cc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.8.14.2&r2=1.8.14.2.2.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/basic_string.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_2-branch&r1=1.20.2.5&r2=1.20.2.5.2.1