incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liviu Nicoara (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-541) std::char_traits<char>::find fails to find characters from the extended ASCII set
Date Thu, 30 Aug 2007 20:22:33 GMT
std::char_traits<char>::find fails to find characters from the extended ASCII set
---------------------------------------------------------------------------------

                 Key: STDCXX-541
                 URL: https://issues.apache.org/jira/browse/STDCXX-541
             Project: C++ Standard Library
          Issue Type: Bug
          Components: 21. Strings
    Affects Versions: 4.2
         Environment: ~$ 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

            Reporter: Liviu Nicoara


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

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


Mime
View raw message