[Bug libstdc++/18640] New: sorting std::vector filled with same values causes segmentation fault

2004-11-23 Thread dp-gccbugzilla at bucho dot org
gcc version is 3.4.3 configured as:
../gcc-3.4.3/configure --prefix=/usr/local/encap/gcc-3.4.3
--program-suffix=-3.4.3 --enable-languages=f77,c++


The attached program simply fills a std::vector with some number of items
of the same value. 

If the vector has 16 or less elements, everything is fine. But if the vector has
17 or more, it will seg fault.

The program takes one argument, the number of elements:
  ./a.out 16  # works fine
  ./a.out 17  # core dumps

Three additional comments:
 - If the values are NOT the same, there seems to be no problem.
 - If the std::not2() adapter is removed, there seems to be no problem.
 - valgrind complains of invalid reads within std::less::operator()

-- 
   Summary: sorting std::vector filled with same values causes
segmentation fault
   Product: gcc
   Version: 3.4.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P2
 Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dp-gccbugzilla at bucho dot org
CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18640


[Bug libstdc++/18640] sorting std::vector filled with same values causes segmentation fault

2004-11-23 Thread dp-gccbugzilla at bucho dot org

--- Additional Comments From dp-gccbugzilla at bucho dot org  2004-11-24 
00:57 ---
Created an attachment (id=7591)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7591&action=view)
This is the program exhibiting the above problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18640