You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by Kostas Pagratis <pa...@roguewave.com> on 2005/10/14 00:53:26 UTC
RE: [jira] Created: (STDCXX-48) [IRIX] std::wmemcpy() copies only
the first character
The wmemcpy function was wrong so I changed it in cwchar. It wasn't
incrementing the src pointer so only the first character of src was being
copied.
Kostas Pagratis
Consulting Engineer
Rogue Wave Software
a Quovadx(TM) Division
(w) 303-545-3268
(c) 303-817-1605
-----Original Message-----
From: Martin Sebor (JIRA) [mailto:jira@apache.org]
Sent: Thursday, October 13, 2005 4:53 PM
To: stdcxx-dev@incubator.apache.org
Subject: [jira] Created: (STDCXX-48) [IRIX] std::wmemcpy() copies only the
first character
[IRIX] std::wmemcpy() copies only the first character
-----------------------------------------------------
Key: STDCXX-48
URL: http://issues.apache.org/jira/browse/STDCXX-48
Project: STDCXX
Type: Bug
Components: 21. Strings
Versions: 4.1.2
Environment: IRIX 6.5
Reporter: Martin Sebor
Assigned to: Martin Sebor
Fix For: 4.1.3
The program below aborts at runtime when compiled with SGI MIPSpro and run
on SGI IRIX 6.5. Note that IRIX doesn't define wmemcpy (the macros
_RWSTD_MO_WMEMCPY and _RWSTD_MO_WMEMCPY_IN_LIBC are both defined) so the
called function must be ours.
$ cat t.cpp && nice gmake t -r && LD_LIBRARY_PATH=../lib ./t
#include <cassert>
#include <cwchar>
int main ()
{
wchar_t dst [4] = { 0, 1, 2, 3 };
std::wmemcpy (dst, L"abc", 3);
assert (L'a' == dst [0]);
assert (L'b' == dst [1]);
assert (L'c' == dst [2]);
assert (L'\0' == dst [3]);
}
CC -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG -D_REENTRANT
-D_RWSTD_USE_CONFIG -I/build/sebor/mipspro-7.41-15d/include
-I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include
-g -ansiW -woff1429,1460,1521,3150,3333 t.cpp
CC t.o -o t -LANG:std=off -Wl,-woff,84 -L/build/sebor/mipspro-7.41-15d/lib
-lpthread -L/build/sebor/mipspro-7.41-15d/lib -lstd15d -lm
rm t.o
Assertion failed: L'b' == dst [1], file t.cpp, line 10, pid B86430
Abort (core dumped)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira