Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.2.0
-
None
-
~$ uname -a
Linux servici 2.6.21 #2 SMP PREEMPT Thu May 24 06:37:50 MDT 2007 i686 unknown unknown GNU/Linux
~$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.0/configure --prefix=/opt/compilers/gcc-4.2.0 --enable-threads --enable-shared --enable-languages=c,c++
Thread model: posix
gcc version 4.2.0~$ uname -a Linux servici 2.6.21 #2 SMP PREEMPT Thu May 24 06:37:50 MDT 2007 i686 unknown unknown GNU/Linux ~$ gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2.0/configure --prefix=/opt/compilers/gcc-4.2.0 --enable-threads --enable-shared --enable-languages=c,c++ Thread model: posix gcc version 4.2.0
Description
The following program asserts:
$ cat t.cpp
#include <string>
#include <assert.h>
int
main ()
{
assert (std::char_traits< char >::find ("a\201", 2, '\201'));
return 0;
}
$ make t && ./t
gcc -c -I/build/nicoara/stdcxx/include/ansi -D_RWSTDDEBUG -I/build/nicoara/stdcxx/include -I/build/nicoara/stdcxx/build/include -I/build/nicoara/stdcxx/examples/include -pedantic -nostdinc++ -g -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align /build/nicoara/stdcxx/examples/manual/t.cpp
gcc t.o -o t -L/build/nicoara/stdcxx/build/lib -lstd11s -lsupc++ -lm
t: /build/nicoara/stdcxx/examples/manual/t.cpp:7: int main(): Assertion `std::char_traits< char >::find ("a\201", 2, '\201')' failed.
Aborted
possibly because of the way memchr is used in include/rw/_traits.h:409
Thanks,
Liviu