You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2007/06/06 12:02:26 UTC

[jira] Closed: (STDCXX-127) std::deque::swap does not swap empty containers correctly

     [ https://issues.apache.org/jira/browse/STDCXX-127?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov closed STDCXX-127.
--------------------------------


The regression test added thus: http://svn.apache.org/viewvc?view=rev&rev=544791


> std::deque::swap does not swap empty containers correctly
> ---------------------------------------------------------
>
>                 Key: STDCXX-127
>                 URL: https://issues.apache.org/jira/browse/STDCXX-127
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 23. Containers
>    Affects Versions: 4.1.3
>         Environment: $ uname -a
> Linux skynet 2.6.14.5 #3 SMP PREEMPT Mon Jan 9 13:59:21 MST 2006 i686 unknown unknown GNU/Linux
> $ gcc -v
> Using built-in specs.
> Target: i686-pc-linux-gnu
> Configured with: ../gcc-4.0.2/configure --prefix=/opt/compilers/gcc-4.0.2 --enable-shared --enable-threads --enable-languages=c,c++
> Thread model: posix
> gcc version 4.0.2
>            Reporter: Liviu Nicoara
>            Assignee: Farid Zaripov
>             Fix For: 4.2
>
>
> Copy and paste at prompt:
> $ cat t.xpp
> #include <cstddef>
> #include <deque>
> struct A { char tmp [32]; };
> int main ()
> {
>     A a [32];
>     std::deque<A> lhs (a, a + 0);
>     std::deque<A> rhs (a, a + 1);
>     lhs.swap (rhs);
>     return 0;
> }
> Building and running the example leads to a SIGSEGV:
> $ make SRCS=t.cpp && ./t
> gcc -c -I/build/nicoara/stdcxx/include/ansi -D_RWSTDDEBUG   -pthread -D_RWSTD_USE_CONFIG -I/build/nicoara/15s-stdcxx/include -I/build/nicoara/stdcxx/include -I/build/nicoara/stdcxx/../rwtest -I/build/nicoara/stdcxx/../rwtest/include -I/build/nicoara/stdcxx/tests/include  -pedantic -nostdinc++ -g  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  /build/nicoara/stdcxx/tests/containers/t.cpp
> gcc t.o -o t -L/build/nicoara/15s-stdcxx/rwtest -lrwtest15s -pthread -L/build/nicoara/15s-stdcxx/lib -lstd15s  -lsupc++ -lm
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.