This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: vector_capacity:test03() failing on mips-irix6
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Thu, 12 Dec 2002 23:25:14 -0600
- Subject: Re: vector_capacity:test03() failing on mips-irix6
- References: <200212130512.AAA04711@caip.rutgers.edu>
>Program received signal SIGSEGV, Segmentation fault.
>0x10010bb4 in __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::fill_n<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, unsigned, int>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, unsigned, int const&) (__first=
> {<iterator<std::random_access_iterator_tag,int,int,int*,int&>> = {<No data fields>}, _M_current = 0x1002c000},
> __n=1073735691, __value=@0x7fff2e48) at bits/stl_algobase.h:539
So.
template<typename _OutputIter, typename _Size, typename _Tp>
_OutputIter
fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
{
// concept requirements
__glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>)
for ( ; __n > 0; --__n, ++__first)
*__first = __value; // <-------here
return __first;
}
This is right after trying to resize a vector to vector.max_size(). I
suspect the allocation has failed but isn't being caught. I don't know
why this is, but it can be reproduced on xscale-elf crosses, in addition
to irix6.5.
-benjamin